Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Open
kpolitowicz opened this Issue · 0 comments

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
Something went wrong with that request. Please try again.