app/controllers/concerns/controller/pagination_concern.rb in itsf_backend-3.1.1 vs app/controllers/concerns/controller/pagination_concern.rb in itsf_backend-4.0.0
- old
+ new
@@ -1,12 +1,10 @@
module Controller
module PaginationConcern
- extend ActiveSupport::Concern
-
private
def load_collection
- collection_scope.page(params[:page]).per(pagination_size)
+ super.page(params[:page]).per(pagination_size)
end
def pagination_size
return collection_scope.count if params[:per_page] == 'all'
params[:per_page] || Itsf::Backend::Configuration.default_pagination_size