Merge pull request #213 from yarikov/master

Rails 5: wrong number of arguments (given 2, expected 0..1)
This commit is contained in:
John McAliley 2016-09-16 09:22:11 -04:00 committed by GitHub
commit 03379bf003
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.
distinct = options[:filter] != :all
if Rails::VERSION::MAJOR == 4
if Rails::VERSION::MAJOR >= 4
distinct ? imps.select(options[:filter]).distinct.count : imps.count
else
distinct ? imps.count(options[:filter], :distinct => true) : imps.count