Fix: wrong number of arguments (given 2, expected 0..1)

This commit is contained in:
Dmitry Yarikov 2016-07-08 11:42:33 +03:00
parent 6e551927ec
commit a0fddc9072
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,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
if Rails::VERSION::MAJOR == 4 if Rails::VERSION::MAJOR >= 4
distinct ? imps.select(options[:filter]).distinct.count : imps.count distinct ? imps.select(options[:filter]).distinct.count : imps.count
else else
distinct ? imps.count(options[:filter], :distinct => true) : imps.count distinct ? imps.count(options[:filter], :distinct => true) : imps.count