module Dune::Api::PaginatedController
Public Instance Methods
respond_with_pagination(collection)
click to toggle source
# File lib/dune/api/paginated_controller.rb, line 10 def respond_with_pagination(collection) render json: collection, meta: { page: collection.current_page, total: collection.total_count, total_pages: collection.total_pages } end