Class: SiteSettings::SettingsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/site_settings/settings_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



3
4
5
# File 'app/controllers/site_settings/settings_controller.rb', line 3

def index
  @settings = Manager.all
end

#updateObject



7
8
9
10
11
12
# File 'app/controllers/site_settings/settings_controller.rb', line 7

def update
  params.except(:action, :controller).each do |key, value|
    Manager.set(key, value)
  end
  redirect_to settings_path, notice: "Settings updated successfully."
end