Fix Mongoid filter error

```NameError: undefined local variable or method `filter'```
This commit is contained in:
Paul Chobert 2013-10-28 19:05:04 +01:00
parent 15fbb76f88
commit 450f04dd66
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 # Count all distinct impressions unless the :all filter is provided
distinct = options[:filter] != :all 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
end end