I made a model Picture that is polymorfic but I want to specify
specific :styles for each model that use Picture.
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.
I made a model Picture that is polymorfic but I want to specify
specific :styles for each model that use Picture.
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.
I made a model Picture that is polymorfic but I want to specify
specific :styles for each model that use Picture.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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs