Method: Ums::FunctionsController#update

Defined in:
app/controllers/ums/functions_controller.rb

#updateObject

PATCH/PUT /ums/functions/1 PATCH/PUT /ums/functions/1.json



42
43
44
45
46
47
48
49
50
51
52
# File 'app/controllers/ums/functions_controller.rb', line 42

def update
  respond_to do |format|
    if @ums_function.update(ums_function_params)
      format.html { redirect_to ums.functions_url, notice: '功能修改成功' }
      format.json { head :no_content }
    else
      format.html { render action: 'edit' , status: :unprocessable_entity}
      format.json { render json: @ums_function.errors, status: :unprocessable_entity }
    end
  end
end