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