Class: NumberedRelationships::HasManyThroughConstructor
- Inherits:
-
Constructor
- Object
- Constructor
- NumberedRelationships::HasManyThroughConstructor
- Defined in:
- lib/numbered_relationships/has_many_through.rb
Instance Method Summary collapse
Methods inherited from Constructor
Constructor Details
This class inherits a constructor from NumberedRelationships::Constructor
Instance Method Details
#construct ⇒ Object
5 6 7 8 9 10 |
# File 'lib/numbered_relationships/has_many_through.rb', line 5 def construct super @klass.joins(through_model, association) .group("#{table}.id") .having("count(#{association.to_s}.id) #{@operator} #{@n}") end |