Fix Mongoid filter error
```NameError: undefined local variable or method `filter'```
This commit is contained in:
parent
15fbb76f88
commit
450f04dd66
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue