Class: Admin::PreferencesController
- Inherits:
-
AdminController
- Object
- AdminController
- Admin::PreferencesController
- Defined in:
- app/controllers/admin/preferences_controller.rb
Instance Method Summary collapse
- #edit ⇒ Object
-
#initialize ⇒ PreferencesController
constructor
A new instance of PreferencesController.
- #show ⇒ Object
- #update ⇒ Object
Constructor Details
#initialize ⇒ PreferencesController
Returns a new instance of PreferencesController.
4 5 6 7 |
# File 'app/controllers/admin/preferences_controller.rb', line 4 def initialize @controller_name = 'user' @template_name = 'preferences' end |
Instance Method Details
#edit ⇒ Object
14 15 16 |
# File 'app/controllers/admin/preferences_controller.rb', line 14 def edit render :layout => 'radiant' end |
#show ⇒ Object
9 10 11 12 |
# File 'app/controllers/admin/preferences_controller.rb', line 9 def show set_standard_body_style render :edit, :layout => 'radiant' end |
#update ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/admin/preferences_controller.rb', line 18 def update if valid_params? if @user.update_attributes(params[:user]) redirect_to :action => 'show' else flash[:error] = t('preferences_controller.error_updating') render :edit, :layout => 'radiant' end else announce_bad_data render :edit, :layout => 'radiant' end end |