how to manage errors in ARes?
Hey all,
I have that function:
def create
@profile = Profile.new(params[:profile])
respond_to do |format|
if @profile.save
flash[:notice] = ''Profile was successfully created.''
format.html { redirect_to profile_url(@profile) }
format.xml { head :created, :location => profile_url(@profile) }
else
format.html { render :action => "new" }
format.xml { render :xml => @profile.errors.to_xml }
end
end
end
Now when I create a profile from ARes with wrong information, I don''t
get the same error I would get normally. I only get some http errors,
not the activeRecord ones, isn''t @profile.errors.to_xml supposed to
send me the ActiveRecord errors? if yes, how can I get that errors.xml
then?
Thanx in advance
Pat
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---