Class: Cms::SearchFilter

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
app/models/cms/search_filter.rb

Overview

Captures values for the search form.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#model_classObject

Returns the value of attribute model_class.



6
7
8
# File 'app/models/cms/search_filter.rb', line 6

def model_class
  @model_class
end

#termObject

Returns the value of attribute term.



6
7
8
# File 'app/models/cms/search_filter.rb', line 6

def term
  @term
end

Class Method Details

.build(params_hash, model_class) ⇒ Object



8
9
10
11
12
# File 'app/models/cms/search_filter.rb', line 8

def self.build(params_hash, model_class)
  model = self.new(params_hash)
  model.model_class = model_class
  model
end

Instance Method Details

#pathObject



14
15
16
# File 'app/models/cms/search_filter.rb', line 14

def path
  model_class
end