Class: SystemSettings::SettingsController

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

Constant Summary collapse

RETURN_ATTRIBUTES =
%w[id name type value description].freeze

Instance Method Summary collapse

Instance Method Details

#editObject



12
# File 'app/controllers/system_settings/settings_controller.rb', line 12

def edit; end

#indexObject



8
9
10
# File 'app/controllers/system_settings/settings_controller.rb', line 8

def index
  @settings = SystemSettings::Setting.order(:name)
end

#showObject



14
# File 'app/controllers/system_settings/settings_controller.rb', line 14

def show; end

#updateObject



16
17
18
19
20
21
22
# File 'app/controllers/system_settings/settings_controller.rb', line 16

def update
  if @setting.update(setting_params)
    redirect_to setting_path(@setting)
  else
    render :edit
  end
end