current_page is not set if paging is used inside scope def #246

Open
kpolitowicz opened this Issue May 31, 2012 · 0 comments

Comments

Projects
None yet
1 participant
@kpolitowicz

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment