On 8/27/07, eggie5 <eggie5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> I want my response to include either the json or xml text, but I also
> want it to include the http status 201. How can I do this?
> if @manufacturer.save
> format.xml { render :xml => @manufacturer.to_xml }
> format.json { render :json => @manufacturer.to_json }
> end
add :status => :created after your render line..?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---