lib/goldiloader/association_info.rb in goldiloader-0.0.5 vs lib/goldiloader/association_info.rb in goldiloader-0.0.6

- old
+ new

@@ -41,10 +41,14 @@ def joins? # Yuck - Through associations will always have a join for *each* 'through' table (@association.association_scope.joins_values.size - num_through_joins) > 0 end + def uniq? + @association.association_scope.uniq_value + end + private def num_through_joins association = @association count = 0 @@ -76,9 +80,13 @@ end def joins? # Rails 3 didn't support joins for associations false + end + + def uniq? + @association.options[:uniq] end end end end