Class: Admin::SettingsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/admin/settings_controller.rb

Instance Method Summary collapse

Instance Method Details

#cache_clearObject


12
13
14
15
# File 'app/controllers/admin/settings_controller.rb', line 12

def cache_clear
  Rails.cache.clear
  render nothing: true
end

#updateObject


6
7
8
9
10
# File 'app/controllers/admin/settings_controller.rb', line 6

def update
  Settings.instance.save(params.require(:settings).permit!.to_h)
  Settings.reload_checker.expire
  redirect_back fallback_location: admin_root_url
end