set_default_order plays poorly with scopes that define order
Reported by Matt Jones | August 24th, 2009 @ 08:29 PM | in Hobo 1.0 - Final
The order set by set_default_order overwrites any order set in a named_scope; so a model that declares:
set_default_order('last_name')
and has a named_scope:
named_scope :by_foo, :order => 'foo DESC'
Won't work correctly. Need to investigate further, as I seem to think this does work sometimes...
Comments and changes to this ticket
-
Bryan Larsen August 28th, 2009 @ 02:55 PM
- Tag set to defect
-
Bryan Larsen August 28th, 2009 @ 02:55 PM
- State changed from new to open
-
Tom Locke November 30th, 2009 @ 11:13 PM
- State changed from open to resolved
(from [9b886e50704c0c28c2035c42ed9222b33459040d]) [#493 state:resolved] Handle default ordering better http://github.com/tablatom/hobo/commit/9b886e50704c0c28c2035c42ed92...
-
Matt Jones November 30th, 2009 @ 11:13 PM
Fixed in 9b886e50704c0c28c2035c42ed9222b33459040d - note that there are still some unanswered questions on #395.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
People watching this ticket
Tags
Referenced by
- 493 set_default_order plays poorly with scopes that define order (from [9b886e50704c0c28c2035c42ed9222b33459040d]) [#493 s...
- 395 Remove default_order (once we're on Rails 2.3) I've also got #493 to look at on this issue.