Module: Enjoy::Faq::Models::Mongoid::Category
- Extended by:
- ActiveSupport::Concern
- Includes:
- HtmlField
- Defined in:
- lib/enjoy/faq/models/mongoid/category.rb
Instance Method Summary collapse
Instance Method Details
#all_questions ⇒ Object
24 25 26 |
# File 'lib/enjoy/faq/models/mongoid/category.rb', line 24 def all_questions question_class.any_in(question_category_ids: self.self_and_descendants.map(&:id)) end |
#questions ⇒ Object
20 21 22 |
# File 'lib/enjoy/faq/models/mongoid/category.rb', line 20 def questions question_class.in(question_category_ids: self.id) end |