Class: WinewooCore::Repositories::Mongo::CriterionsMongoRepo::PictosFinder
- Inherits:
-
Finder
- Object
- Finder
- WinewooCore::Repositories::Mongo::CriterionsMongoRepo::PictosFinder
- Defined in:
- lib/winewoo_core/repositories/mongo/criterions_mongo_repo.rb
Instance Method Summary collapse
- #find ⇒ Object
-
#initialize(category, query_param) ⇒ PictosFinder
constructor
A new instance of PictosFinder.
Methods inherited from Finder
Constructor Details
#initialize(category, query_param) ⇒ PictosFinder
Returns a new instance of PictosFinder.
144 145 146 147 |
# File 'lib/winewoo_core/repositories/mongo/criterions_mongo_repo.rb', line 144 def initialize(category, query_param) super(query_param) @category = category end |
Instance Method Details
#find ⇒ Object
150 151 152 153 154 155 |
# File 'lib/winewoo_core/repositories/mongo/criterions_mongo_repo.rb', line 150 def find res = WinewooCore::Repositories::Mongo::Queries::PictoQuery.new.from_category(@category).by_name res = res.full_text_search @filters.query if @filters.query return res.page(@filters.page || 1) .per(@filters.per_page || Kaminari::config.default_per_page) end |