respond_to do |format|
if @begger.save
format.html { redirect_to(@begger, :notice => 'Begger was successfully created.') }
format.xml { render :xml => @begger, :status => :created, :location => @begger }
else
format.html { render :action => "new" }
format.xml { render :xml => @begger.errors, :status => :unprocessable_entity }
end
end
The render method takes several options for its first argument: :text, :nothing, :inline, :template,
:action, :xml, :json, :js, and :update.
0 Comments