Module: MayNeedReview::ClassMethods
- Defined in:
- app/models/may_need_review.rb
Instance Method Summary collapse
-
#find_all_that_need_review ⇒ Object
This class method gets all ProfileFields that are marked as :needs_review.
-
#find_all_that_need_review_by_profile_field_ids(profile_field_ids) ⇒ Object
This class method gets all ProfileFields that match the given ids and are marked as :needs_review.
Instance Method Details
#find_all_that_need_review ⇒ Object
This class method gets all ProfileFields that are marked as :needs_review.
16 17 18 |
# File 'app/models/may_need_review.rb', line 16 def find_all_that_need_review self.joins(:flags).where('flags.key' => :needs_review, 'flags.flagable_type' => 'ProfileField') end |
#find_all_that_need_review_by_profile_field_ids(profile_field_ids) ⇒ Object
This class method gets all ProfileFields that match the given ids and are marked as :needs_review.
23 24 25 |
# File 'app/models/may_need_review.rb', line 23 def find_all_that_need_review_by_profile_field_ids(profile_field_ids) self.find_all_that_need_review.where(id: profile_field_ids) end |