Created
February 3, 2011 12:56
-
-
Save tibra/809444 to your computer and use it in GitHub Desktop.
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
Here we get :parent_type --> works √ | |
Paperclip.interpolates :parent_type do |attachment, style| | |
attachment.instance.uploadable_type.downcase | |
end | |
Here, :parent_type works in :path => but not in Proc, how do I solve this? | |
has_attached_file :attachment, | |
:path => ":class/:parent_type/:id/:style.:extension", | |
:styles => Proc.new { |a| a.instance.set_style(:parent_type) } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment