Method: CheckinsController#update

Defined in:
app/controllers/checkins_controller.rb

#updateObject

PUT /checkins/1 PUT /checkins/1.json



93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'app/controllers/checkins_controller.rb', line 93

def update
  @checkin.assign_attributes(checkin_params)
  @checkin.librarian = current_user

  respond_to do |format|
    if @checkin.save
      format.html { redirect_to @checkin, notice: t('controller.successfully_updated', model: t('activerecord.models.checkin')) }
      format.json { head :no_content }
    else
      format.html { render action: "edit" }
      format.json { render json: @checkin.errors, status: :unprocessable_entity }
    end
  end
end