Last active
March 19, 2019 00:54
-
-
Save sgringwe/8985439 to your computer and use it in GitHub Desktop.
rails 4 paperclip asset_path precompiled default_url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I was having trouble setting the default_url for paperclip attachables while using rails 4 asset pipeline fingerprints. | |
What was not working for some reason: | |
default_url: ActionController::Base.helpers.asset_path('event_default.jpg') | |
What worked for me: | |
default_url: lambda { |image| ActionController::Base.helpers.asset_path('event_default.jpg') } | |
Hope this helps someone |
π
Doesn't work for me :(
You're a lifesaver! Thanks!
Thanks!
Awesome. Thank you.
Thank you, this solved my problem where it worked in development but not in production. lambda makes a little bit of sense though not obvious.
Thank you! π
π
Awesome! Thanks!!
β€οΈ
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks it did!