Class: Fae::OptionsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/fae/options_controller.rb

Instance Method Summary collapse

Methods included from NavItems

#nav_items

Instance Method Details

#editObject



6
7
8
9
10
# File 'app/controllers/fae/options_controller.rb', line 6

def edit
  @option = Option.first || Option.instance
  @option. if @option..blank?
  @option.build_favicon if @option.favicon.blank?
end

#updateObject

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