Method: ClassificationsController#update

Defined in:
app/controllers/classifications_controller.rb

#updateObject

PUT /classifications/1 PUT /classifications/1.json



86
87
88
89
90
91
92
93
94
95
96
97
# File 'app/controllers/classifications_controller.rb', line 86

def update
  respond_to do |format|
    if @classification.update_attributes(classification_params)
      format.html { redirect_to @classification, notice: t('controller.successfully_updated', model: t('activerecord.models.classification')) }
      format.json { head :no_content }
    else
      @classification_types = ClassificationType.all
      format.html { render action: "edit" }
      format.json { render json: @classification.errors, status: :unprocessable_entity }
    end
  end
end