Hi people, with the attachment_fu plugin, how can i handle things when
errors occur with an image upload, so the user doesn''t see a blank
screen on the production site.
?
Also in general how should I be handling form submit errors, I''m
using...
def signup
return unless request.post?
begin
...
#redirect to homepage if all ok
redirect_back_or_default(:action => ''profile'')
rescue ActiveRecord::RecordInvalid
#if not, redirect to signup page with message
flash[:notice] = "Sorry, something went wrong"
render :action => ''signup''
end
end
--
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
-~----------~----~----~----~------~----~------~--~---