This project is archived and is in readonly mode.
default_scope with named_scope or scoped merge broken on 2.3
Reported by Yaroslav Markin | March 16th, 2009 @ 06:59 PM | in 2.x
Failing tests included, don't have a solution ATM.
Reference: #2193
Basically, if you got a default_scope with :order, named_scopes with different :order will NOT override it.
Comments and changes to this ticket
-
Geoff Buesing March 18th, 2009 @ 09:20 PM
I'm noticing this broken behavior too. Haven't had a chance to look into the reasons why yet.
-
Peter Wagenet March 19th, 2009 @ 02:04 PM
It's expected behavior, believe it or not, look at the tests. Default_scope does not behave the same as named_scope. This should be fixed in my patch over here: http://rails.lighthouseapp.com/p...
-
Yaroslav Markin March 23rd, 2009 @ 02:03 PM
@Manfred, Pratik: any chance we can rollback #2193? Seems it causes more trouble then fixes things, count with
named_scope(:select => ...)
seems to be broken as well. -
Manfred Stienstra March 23rd, 2009 @ 02:35 PM
Well, the change was a fix for a number of regressions I saw in building instances through an has_many :through association I think. So reverting this would break that.
-
Alexander Podgorbunsky March 26th, 2009 @ 01:07 PM
Manfred's commit has actually nothing to do with this bug -- see #1960
-
Yaroslav Markin April 15th, 2009 @ 10:03 PM
This ticket is totally wrong, #2346 is the correct one. Will wait for cleanup :)
-
Jeremy Kemper May 1st, 2009 @ 11:03 PM
- State changed from new to duplicate
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>