Class: Fae::OptionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Fae::OptionsController
- Defined in:
- app/controllers/fae/options_controller.rb
Instance Method Summary collapse
- #edit ⇒ Object
-
#update ⇒ Object
PATCH/PUT /options/1.
Instance Method Details
#edit ⇒ Object
6 7 8 9 10 |
# File 'app/controllers/fae/options_controller.rb', line 6 def edit @option = Option.first || Option.instance @option.build_logo if @option.logo.blank? @option.build_favicon if @option.favicon.blank? end |
#update ⇒ Object
PATCH/PUT /options/1
13 14 15 16 17 18 19 20 |
# File 'app/controllers/fae/options_controller.rb', line 13 def update if @option.update(option_params) flash[:notice] = 'Option was successfully updated.' redirect_to :action => :edit else render :edit end end |