New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes missing method path_for
when using MirrorService with DiskService as the primary service
#35268
Fixes missing method path_for
when using MirrorService with DiskService as the primary service
#35268
Conversation
Thanks, @abhaynikam. This needs a test. |
fc81332
to
b14bb71
Compare
@georgeclaghorn : Added test cases. Please let me know if we should add more cases. |
b14bb71
to
38ab8fd
Compare
@@ -61,4 +61,8 @@ class ActiveStorage::Service::MirrorServiceTest < ActiveSupport::TestCase | |||
@service.url(@key, expires_in: 2.minutes, disposition: :inline, filename: filename, content_type: "text/plain") | |||
end | |||
end | |||
|
|||
test "path for file in primary service" do | |||
assert_equal @service.primary.path_for(@key), @service.url_for(@key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I used url_for
in my example when I meant path_for
. 🤦♂️
assert_equal @service.primary.path_for(@key), @service.url_for(@key) | |
assert_equal @service.primary.path_for(@key), @service.path_for(@key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. My bad. I should have checked it.
38ab8fd
to
d3f9226
Compare
@georgeclaghorn : Done with the changes. |
Thank you! |
…-for-method Fixes missing method `path_for` when using MirrorService with DiskService as the primary service
fixes #35252
@r? @georgeclaghorn
cc/ @marcusmalmberg