Skip to content

Commit 34360cd

Browse files
author
Lee Richmond
committed
Switch uniq to distinct for Rails 5.1 compat
1 parent b52dbe8 commit 34360cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/jsonapi_compliable/adapters/active_record.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def paginate(scope, current_page, per_page)
2222
# (see Adapters::Abstract#count)
2323
def count(scope, attr)
2424
column = attr == :total ? :all : attr
25-
scope.uniq.count(column)
25+
scope.distinct.count(column)
2626
end
2727

2828
# (see Adapters::Abstract#average)

0 commit comments

Comments
 (0)