Method: Ums::FunctionsController#create
- Defined in:
- app/controllers/ums/functions_controller.rb
#create ⇒ Object
POST /ums/functions POST /ums/functions.json
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'app/controllers/ums/functions_controller.rb', line 26 def create @ums_function = Ums::Function.new(ums_function_params) respond_to do |format| if @ums_function.save format.html { redirect_to ums.functions_url, notice: '功能创建创建成功.' } format.json { render action: 'show', status: :created, location: @ums_function } else format.html { render action: 'new' , status: :unprocessable_entity} format.json { render json: @ums_function.errors, status: :unprocessable_entity } end end end |