Class: WinewooCore::Services::Finders::Wines::KeywordsWinesFinder
- Inherits:
-
WinesFinder
- Object
- WinesFinder
- WinewooCore::Services::Finders::Wines::KeywordsWinesFinder
- Defined in:
- lib/winewoo_core/services/finders/wines/keywords_wines_finder.rb
Instance Method Summary collapse
Methods inherited from WinesFinder
Constructor Details
This class inherits a constructor from WinewooCore::Services::Finders::Wines::WinesFinder
Instance Method Details
#find ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/winewoo_core/services/finders/wines/keywords_wines_finder.rb', line 4 def find query = @interpro ? WinewooCore::Repositories::Mongo::Queries::WineQuery.new.officials.published : WinewooCore::Repositories::Mongo::Queries::WineQuery.new.officials.published # TODO UNOFFICIALS # query = query.officials.from_interpro(@interpro.id) if @interpro query = query.from_interpro(@interpro.id) if @interpro query = query.full_text_search(@filters.query, match: :all) wines = query.page(@page || 1) .per(@per_page || Kaminari::config.default_per_page) return wines, "search", query.count end |