Class: Spree::CmsPages::Find
- Inherits:
-
BaseFinder
- Object
- BaseFinder
- Spree::CmsPages::Find
- Defined in:
- app/finders/spree/cms_pages/find.rb
Constant Summary collapse
- ALLOWED_KINDS =
%w[standard home feature].freeze
Instance Attribute Summary
Attributes inherited from BaseFinder
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(scope:, params:) ⇒ Find
constructor
A new instance of Find.
Constructor Details
#initialize(scope:, params:) ⇒ Find
Returns a new instance of Find.
6 7 8 9 10 |
# File 'app/finders/spree/cms_pages/find.rb', line 6 def initialize(scope:, params:) @scope = scope @title = params.dig(:filter, :title) @kind = params.dig(:filter, :type) end |
Instance Method Details
#execute ⇒ Object
12 13 14 15 16 17 |
# File 'app/finders/spree/cms_pages/find.rb', line 12 def execute pages = by_title(scope) pages = by_kind(pages) pages end |