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 |
👍
Awesome! Thanks!!
❤️
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you! 👍