I made a model Picture that is polymorfic but I want to specify specific :styles for each model that use Picture. http://pastie.org/1034662 I don''t know how to this, I used lambda for this but he doesn''t know the data.instance.picturable on submit. It returns always nil. -- 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.
> I made a model Picture that is polymorfic but I want to specify > specific :styles for each model that use Picture. > > http://pastie.org/1034662 > > I don''t know how to this, I used lambda for this but he doesn''t know > the data.instance.picturable on submit. It returns always nil.My memory is that you can''t do this. The has_attachment code gets evaluated long before any specific model associations are present. And the style definitions aren''t lazily loaded. Or something. In any event I tried to do something similar to what you''re doing and it doesn''t work. -philip -- 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.