Merge pull request #213 from yarikov/master
Rails 5: wrong number of arguments (given 2, expected 0..1)
This commit is contained in:
commit
03379bf003
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue