Method: ItemsController#update
- Defined in:
- app/controllers/items_controller.rb
#update ⇒ Object
PUT /items/1 PUT /items/1.json
224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'app/controllers/items_controller.rb', line 224 def update respond_to do |format| if @item.update_attributes(item_params) format.html { redirect_to @item, notice: t('controller.successfully_updated', model: t('activerecord.models.item')) } format.json { head :no_content } else format.html { render action: "edit" } format.json { render json: @item.errors, status: :unprocessable_entity } end end end |