Class: RademadeAdmin::Search::Conditions::Abstract
- Inherits:
-
Object
- Object
- RademadeAdmin::Search::Conditions::Abstract
- Defined in:
- app/services/search/conditions/abstract.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #base_condition(model) ⇒ Object
- #conditions ⇒ Object
-
#initialize(params, data_items) ⇒ Abstract
constructor
A new instance of Abstract.
Constructor Details
#initialize(params, data_items) ⇒ Abstract
Returns a new instance of Abstract.
12 13 14 15 |
# File 'app/services/search/conditions/abstract.rb', line 12 def initialize(params, data_items) @params = params @data_items = data_items end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
7 8 9 |
# File 'app/services/search/conditions/abstract.rb', line 7 def params @params end |
Instance Method Details
#base_condition(model) ⇒ Object
27 28 29 30 31 |
# File 'app/services/search/conditions/abstract.rb', line 27 def base_condition(model) # todo. deleted at? # We can't use default scope. It can be patched model.unscoped end |
#conditions ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'app/services/search/conditions/abstract.rb', line 17 def conditions @conditions ||= { :where => where, :order => order, :page => page, :per_page => per_page, :limit => limit } end |