Module: Kinney::Concerns::Models::Person::ClassMethods
- Defined in:
- lib/concerns/models/person.rb
Instance Method Summary collapse
Instance Method Details
#with_clips ⇒ Object
48 49 50 |
# File 'lib/concerns/models/person.rb', line 48 def with_clips joins(:clips).group("kinney_people.id HAVING count(kinney_clips.id) > 0") end |
#with_images ⇒ Object
54 55 56 |
# File 'lib/concerns/models/person.rb', line 54 def with_images joins(:images).group("kinney_people.id HAVING count(kinney_images.id) > 0") end |
#with_top_pick_clip ⇒ Object
51 52 53 |
# File 'lib/concerns/models/person.rb', line 51 def with_top_pick_clip joins(:clips).where('kinney_clips.top_pick' => true) end |
#without_images ⇒ Object
57 58 59 |
# File 'lib/concerns/models/person.rb', line 57 def without_images includes(:person_images).where(:kinney_person_images => {:person_id => nil}) end |