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



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

def edit; end

#indexObject



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

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

#showObject



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

def show; end

#updateObject



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

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