module SimplePaginate::ActionViewExtension

Public Instance Methods

simple_paginate(scope, options = {}) click to toggle source

A helper that renders the pagination links

# File lib/simple_paginate/helpers/action_view_extension.rb, line 4
def simple_paginate(scope, options = {})
  paginator = SimplePaginate::Helpers::Paginator.new self, options.reverse_merge(current_page: scope.current_page, per_page: scope.limit_value, length: scope.actual_records_length)
  paginator.to_s
end