Merge pull request #128 from barodeur/fix_mongoid_filter_not_defined

Fix Mongoid undefined 'filter' error
This commit is contained in:
Antonio C Nalesso Moreira 2013-10-28 13:14:00 -07:00
commit 0ff7a09e82
1 changed files with 1 additions and 1 deletions

View File

@ -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