Any tips as to how paperclip can be used to delete photos. I mean that in my update view I show six browse buttons, all capable of updating the photo that corresponds to that browse button (e.g. photo1 or photo2). That works, what if the user wants to delete one of those photos, how do I do that? bb -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
bingo bob wrote:> Any tips as to how paperclip can be used to delete photos. > > I mean that in my update view I show six browse buttons, all capable of > updating the photo that corresponds to that browse button (e.g. photo1 > or photo2). That works, what if the user wants to delete one of those > photos, how do I do that? > > bbLooking to find out what I need to do in my view and in my controller. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Anyone have any tips on this one? I suppose I may need an additional action in my controller to cope with deletion of a particular photo and then re-render the edit view.. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---