lib/acts_as.rb in acts_as-0.6.4 vs lib/acts_as.rb in acts_as-0.6.5
- old
+ new
@@ -56,10 +56,9 @@
fields.select { |f| method.to_s.include?(f) }.any?
end.keys.first
end
def where(opts = :chain, *rest)
- return self if opts.blank?
relation = super
#TODO support nested attribute joins like Guns.where(rebels: {strength: 10}))
# for now, only first level joins will happen automagically
if opts.is_a? Hash
detected_associations = opts.keys.map {|attr| acts_as_fields_match(attr) }