lib/acts_as.rb in acts_as-0.3.1 vs lib/acts_as.rb in acts_as-0.3.2
- old
+ new
@@ -67,10 +67,10 @@
def expand_hash_conditions_for_aggregates(attrs)
attrs = super(attrs)
expanded_attrs = {}
attrs.each do |attr, value|
- if (association = acts_as_fields_match(attr))
+ if (association = acts_as_fields_match(attr)) && !self.columns.map(&:name).include?(attr.to_s)
expanded_attrs[new.send(association).class.table_name] = { attr => value }
else
expanded_attrs[attr] = value
end
end