For reference, here's the edit view for an advert, as I say, I'm trying
to integrate a fiunction that allows users to delete one of the photos
(1 to 6), any clues as to what i might do in this form / controller.
<h1>Editing advert</h1>
<div id="advert_images">
<%= render :partial => "images", :locals => { :advert => @advert } %>
</div>
<% form_for @advert, :html => { :multipart => true } do |f| %>
<%= f.error_messages %>
<ul>
<li><%= f.file_field :photo1%></li>
<li><%= f.file_field :photo2%></li>
<li><%= f.file_field :photo3%></li>
<li><%= f.file_field :photo4%></li>
<li><%= f.file_field :photo5%></li>
<li><%= f.file_field :photo6%></li>
</ul>
<p>
<%= f.label :title %><br />
<%= f.text_field :title %>
</p>
<p>
<%= f.label :description %><br />
<%= f.text_area :description %>
</p>
<p>
<%= f.submit "Update" %>
</p>
<% end %>
<%= link_to 'Show', @advert %> |
<%= link_to 'Back', adverts_path %>
--
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---