In my ''new'' view for an Item object, the user can upload a
picture of
the item. How can I make the upload optional (while creating the new
item)? I''m using REST and this is a portion of what my controller
looks like to make it Mandatory to upload an image:
respond_to do |format|
if @item.save and @photo.save
Now if I remove the @photo.save no image will be created (even if it
is valid).
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---