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
On 8/27/07, eggie5 [email protected] 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ā¦?
thanks