mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
Don't lose source location of the pagination method
This commit is contained in:
parent
be3a2c9a21
commit
509c945342
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ module Kaminari
|
||||||
|
|
||||||
# Fetch the values at the specified page number
|
# Fetch the values at the specified page number
|
||||||
# Model.page(5)
|
# Model.page(5)
|
||||||
eval <<-RUBY
|
eval <<-RUBY, nil, __FILE__, __LINE__ + 1
|
||||||
def self.#{Kaminari.config.page_method_name}(num = nil)
|
def self.#{Kaminari.config.page_method_name}(num = nil)
|
||||||
limit(default_per_page).offset(default_per_page * ((num = num.to_i - 1) < 0 ? 0 : num)).extending do
|
limit(default_per_page).offset(default_per_page * ((num = num.to_i - 1) < 0 ? 0 : num)).extending do
|
||||||
include Kaminari::ActiveRecordRelationMethods
|
include Kaminari::ActiveRecordRelationMethods
|
||||||
|
|
Loading…
Reference in a new issue