Method: Cmtool::QuotesController#update
- Defined in:
- app/controllers/cmtool/quotes_controller.rb
#update ⇒ Object
PUT /quotes/1 PUT /quotes/1.xml
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'app/controllers/cmtool/quotes_controller.rb', line 59 def update @quote = Cmtool::Quote.find(params[:id]) respond_to do |format| if @quote.update_attributes(params[:quote]) format.html { redirect_to([cmtool, @quote], :notice => I18n.t('cmtool.action.update.successful', :model => Cmtool::Quote.model_name.human)) } format.xml { head :ok } else format.html { render :action => "edit" } format.xml { render :xml => @quote.errors, :status => :unprocessable_entity } end end end |