Method: CEO::Paginator#initialize

Defined in:
lib/ceo/paginator.rb

#initialize(scope, options) ⇒ Paginator

Constructor

scope - The ActiveRecord scope to page over current_page - The Number of the current page. >= 1 per_page - The number of records per page



51
52
53
54
55
# File 'lib/ceo/paginator.rb', line 51

def initialize(scope, options)
  @current_page = options.fetch :current_page
  @per_page = options.fetch :per_page
  @scope = scope
end