Displaying 1 result from an estimated 1 matches for "container_type".
Did you mean:
containedtype
2009 Feb 11
0
remote_form_for file_field strangeness
Does anyone see any problem with this form?
- form_remote_for(Photo.new, :html => {:multipart => true, :target
=> :uploader}) do |f|
.form_element
= f.label :photo
= f.file_field :collateral
= hidden_field_tag :container_id, @shoot.id
= hidden_field_tag :container_type, @shoot.class.name
.form_element
= f.submit ''Add Photos''
The photo has a paperclip attachment called collateral, and a double
polymorphic relation with container (which can be a shoot, model or
photographer). At the bottom of the page is an iframe with the id and
name '...