Class: Spree::BaseSorter
- Inherits:
-
Object
- Object
- Spree::BaseSorter
- Defined in:
- app/sorters/spree/base_sorter.rb
Direct Known Subclasses
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(scope, params = {}, allowed_sort_attributes = []) ⇒ BaseSorter
constructor
A new instance of BaseSorter.
Constructor Details
#initialize(scope, params = {}, allowed_sort_attributes = []) ⇒ BaseSorter
Returns a new instance of BaseSorter.
3 4 5 6 7 |
# File 'app/sorters/spree/base_sorter.rb', line 3 def initialize(scope, params = {}, allowed_sort_attributes = []) @scope = scope @allowed_sort_attributes = allowed_sort_attributes @sort = sort_fields(params[:sort]) end |
Instance Method Details
#call ⇒ Object
9 10 11 |
# File 'app/sorters/spree/base_sorter.rb', line 9 def call by_param_attributes(scope) end |