Skip to content

Commit 8f1ddf7

Browse files
committed
fix regression for multi word classes
1 parent 484c93e commit 8f1ddf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/api-pagination.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def default_per_page_for_will_paginate(collection)
8282

8383
def detect_model(collection)
8484
if collection.respond_to?(:table_name)
85-
collection.table_name.singularize.capitalize.constantize
85+
collection.table_name.classify.constantize
8686
else
8787
collection.first.class
8888
end

0 commit comments

Comments
 (0)