Method: Stay::Admin::StatesController#update

Defined in:
app/controllers/stay/admin/states_controller.rb

#updateObject

PATCH/PUT /admin/countries/:country_id/states/:id



38
39
40
41
42
43
44
# File 'app/controllers/stay/admin/states_controller.rb', line 38

def update
  if @state.update(state_params)
    redirect_to admin_country_states_path(@country), notice: 'State was successfully updated.'
  else
    render :edit
  end
end