Method: ChainsController#update
- Defined in:
- app/controllers/chains_controller.rb
#update ⇒ Object
PATCH/PUT /chains/1 or /chains/1.json
40 41 42 43 44 45 46 47 48 49 50 |
# File 'app/controllers/chains_controller.rb', line 40 def update respond_to do |format| if @chain.update(chain_params) format.html { redirect_to chain_url(@chain), notice: "Chain was successfully updated." } format.json { render :show, status: :ok, location: @chain } else format.html { render :edit, status: :unprocessable_entity } format.json { render json: @chain.errors, status: :unprocessable_entity } end end end |