Class: Admin::PreferencesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/admin/preferences_controller.rb

Instance Attribute Summary

Attributes inherited from ApplicationController

#cache, #pagination_parameters, #trusty_config

Instance Method Summary collapse

Methods inherited from ApplicationController

#after_sign_in_path_for, #initialize, #template_name

Methods included from LoginSystem

included

Constructor Details

This class inherits a constructor from ApplicationController

Instance Method Details

#editObject



9
10
11
# File 'app/controllers/admin/preferences_controller.rb', line 9

def edit
  render
end

#showObject



4
5
6
7
# File 'app/controllers/admin/preferences_controller.rb', line 4

def show
  set_standard_body_style
  render :edit
end

#updateObject



13
14
15
16
17
18
19
20
# File 'app/controllers/admin/preferences_controller.rb', line 13

def update
  if @user.update(preferences_params)
    redirect_to admin_configuration_path
  else
    flash[:error] = t('preferences_controller.error_updating')
    render :edit
  end
end