Class: Admin::SettingsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Admin::SettingsController
- Defined in:
- app/controllers/admin/settings_controller.rb
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
12 13 |
# File 'app/controllers/admin/settings_controller.rb', line 12 def edit end |
#update ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/admin/settings_controller.rb', line 15 def update if check_password && @current_user.update(user_params) if user_params.include?(:password) SpudUserSession.create(@current_user) end flash[:notice] = 'User settings saved successfully.' respond_with @current_user, location: admin_settings_path else render 'edit', status: :unauthorized end end |