Merge pull request #128 from barodeur/fix_mongoid_filter_not_defined
Fix Mongoid undefined 'filter' error
This commit is contained in:
commit
0ff7a09e82
|
@ -18,7 +18,7 @@ module Impressionist
|
|||
|
||||
# Count all distinct impressions unless the :all filter is provided
|
||||
distinct = options[:filter] != :all
|
||||
distinct ? imps.where(filter.ne => nil).distinct(filter).count : imps.count
|
||||
distinct ? imps.where(options[:filter].ne => nil).distinct(options[:filter]).count : imps.count
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue