Skip to content

Commit

Permalink
Fix: wrong number of arguments (given 2, expected 0..1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Yarikov committed Jul 8, 2016
1 parent 6e55192 commit a0fddc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/impressionist/impressionable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def impressionist_count(options={})

# 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
Expand Down

0 comments on commit a0fddc9

Please sign in to comment.