will_paginate icon indicating copy to clipboard operation
will_paginate copied to clipboard

current_page is not set if paging is used inside scope def

Open kpolitowicz opened this issue 13 years ago • 0 comments

Trivial example:

class Person <  < ActiveRecord::Base
  scope :paged, lambda { |p| page(p) }
end

Now:

irb(main):002:0> Person.paged(1).current_page
=> nil
irb(main):003:0> Person.page(1).current_page
=> page 1

to_sql returns the same of course.

kpolitowicz avatar May 31 '12 20:05 kpolitowicz