Class: BaseApp

Inherits:
Controllers::Base
  • Object
show all
Defined in:
app/controllers/base_app.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#selected_tagsObject (readonly)

Returns the value of attribute selected_tags.



16
17
18
# File 'app/controllers/base_app.rb', line 16

def selected_tags
  @selected_tags
end

Instance Method Details

#prepare_general_paramsObject



6
7
8
9
10
11
12
13
14
# File 'app/controllers/base_app.rb', line 6

def prepare_general_params
  if params._tags
    @selected_tags = params._tags.split('-').select{|tag| Models::Tag.valid_name?(tag)}
  else
    @selected_tags = []
  end
  @selected_tags.freeze
  @selected_tags
end