Class: Exo::Admin::SettingsController
- Inherits:
-
Exo::AdminController
- Object
- ActionController::Base
- ExoController
- Exo::AdminController
- Exo::Admin::SettingsController
- Defined in:
- app/controllers/exo/admin/settings_controller.rb
Constant Summary collapse
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'app/controllers/exo/admin/settings_controller.rb', line 23 def create current_setting.setting_container = for_route? ? current_route : exo_site if current_setting.save redirect_to_parent else render 'new' end end |
#destroy ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'app/controllers/exo/admin/settings_controller.rb', line 40 def destroy if current_setting.system flash[:alert] = "This is a system setting and cannot be required" else current_setting.destroy end redirect_to_parent end |
#update ⇒ Object
32 33 34 35 36 37 38 |
# File 'app/controllers/exo/admin/settings_controller.rb', line 32 def update if current_setting.update_attributes update_setting_params redirect_to_parent else render 'edit' end end |