I made my model Picture polymorphic and this model use paperclip. Now I want to specify :styles for the model that have many pictures, but I can''t find a solution to fix this. At the moment I use this and all is working good : http://pastie.org/1034105 But for example for model Brand I need different styles then for model Product. I tried a lambda like this : :styles => lambda{|data| data.instance.picturable.attachment_styles} But that is not a solution because it seems that link between the model is not set when firing submit, he first do has_attached_file stuff and then the inserting in the database, it means that showing the objects is no problem but creating. He doesn''t know the object jet, you can find console output here : http://pastie.org/1034667 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.