Class: Maglev::SearchPages
- Inherits:
-
Object
- Object
- Maglev::SearchPages
- Includes:
- Injectable
- Defined in:
- app/services/maglev/search_pages.rb
Overview
Search for a single page if the id param is passed to the call function or search for all the pages matching or not the q criteria (based on its presence). It also searches among the static pages
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
21 22 23 24 25 |
# File 'app/services/maglev/search_pages.rb', line 21 def call return single_page if id.present? with_static_pages ? all_pages : find_persisted_pages end |