Method: Weeler::SettingsController#update

Defined in:
app/controllers/weeler/settings_controller.rb

#updateObject



19
20
21
22
23
24
25
26
27
28
# File 'app/controllers/weeler/settings_controller.rb', line 19

def update
  @setting = Setting.find(params[:id])

  if @setting.update(update_setting_params)
    redirect_to weeler_settings_path, flash: { success: 'Setting updated.' }
  else
    flash.now[:error] = 'Errors on updating.'
    render :index
  end
end