Module: Resourcey::ControllerPagination::ClassMethods

Defined in:
lib/resourcey/controller_pagination.rb

Instance Method Summary collapse

Instance Method Details

#paginate(opts = {}) ⇒ Object



35
36
37
# File 'lib/resourcey/controller_pagination.rb', line 35

def paginate(opts = {})
  paginate_with(Resourcey.config.default_paginator, opts)
end

#paginate_with(name, opts = {}) ⇒ Object



29
30
31
32
33
# File 'lib/resourcey/controller_pagination.rb', line 29

def paginate_with(name, opts = {})
  enable_pagination!
  self.controller_paginator_name = name
  self.controller_paginator_options = opts
end