Skip to content

Commit c795e0c

Browse files
authored
Merge pull request #29 from richmolj/generators2
Switch uniq to distinct for Rails 5.1 compat
2 parents b52dbe8 + 34360cd commit c795e0c

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)