This project is archived and is in readonly mode.
ActiveRecord::Relation#except and #only loses scope extensions
Given a scope with extensions
When I use the
except to remove a part from the
Then the extensions are gone, because
except returns a
brand new relation object.
This means the following doesn't work (when using Kaminari, which uses extensions):
Because the current_page method was added by the
This issue is present in at least 3.0.5 and master.
The supplied patch will apply the extensions again after using
There is some duplication going on in both methods. A private method could certainly be extracted (although I'm clueless on a name).
Edit: GitHub pull request started working again: https://github.com/rails/rails/pull/231
Comments and changes to this ticket
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>