Class: PublishMyData::ResourcePaginationParams

Inherits:
PaginationParams show all
Defined in:
lib/publish_my_data/paginator.rb

Instance Attribute Summary

Attributes inherited from PaginationParams

#format, #offset, #page, #per_page

Instance Method Summary collapse

Methods inherited from PaginationParams

#==, from_request

Constructor Details

#initialize(opts = {}) ⇒ ResourcePaginationParams

Returns a new instance of ResourcePaginationParams.



42
43
44
45
46
# File 'lib/publish_my_data/paginator.rb', line 42

def initialize(opts={})
  opts[:per_page] ||= PublishMyData.default_html_resources_per_page
  opts[:per_page] = PublishMyData.max_resources_per_page if opts[:per_page].to_i > PublishMyData.max_resources_per_page
  super
end