-
Notifications
You must be signed in to change notification settings - Fork 35
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
Incompatibility with Rails 5.2 ActiveStorage #33
Comments
Uh, that sucks, thanks for reporting. I wonder if it'd be possible to configure your way out of this? Something like
should prevent route_downcaser from modifying URLs in the |
I just spent quite a while trying to track down this same issue myself. The example by @koppen does indeed work around the issue. Is there any strong reason we couldn't make that the default and save others the trouble of discovering it? FWIW, I took a go at ActiveStorage about a year ago and gave up thinking it was broken at the time. I was quite surprised this was the fix! I'm not trying to place blame at all, but I think there's a strong argument for making route_downcaser work with ActiveStorage out of the box. |
Cool, thanks for verifying the fix @lostapathy. route_downcaser tries to assume as little as possible about your environment or application as possible, and it's not a Rails-only gem, so adding exceptions for Rails-specific functionality or other third party behaviour seems out of scope. If we do want to add something, it should probably be some opt-in thing, perhaps a configuration option ( That said, at the very least we should be able to document it, perhaps as a special note in the section about |
ActiveStorage uses
signed_blob_id
parameters that are case-sensitive. At present, this is incompatible with theroute_downcaser
gem. However, the downcasing of routes in general is a useful concept. If there would be any way to exempt these ActiveStorage generated urls (they are typically of the form/rails/active_storage/...
with the built-in routing in Rails), that would really help me out.The text was updated successfully, but these errors were encountered: