Module: WCC::API::ViewHelpers

Defined in:
lib/wcc/api/view_helpers.rb

Instance Method Summary collapse

Instance Method Details

#api_pagination_for(query:) ⇒ Object


5
6
7
8
9
10
# File 'lib/wcc/api/view_helpers.rb', line 5

def api_pagination_for(query:)
  WCC::API::JSON::Pagination.new(
    query,
    url_for: ->(params) { url_for(params) }
  ).to_builder
end