Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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) }
Add Comment
Please, Sign In to add comment