This project is archived and is in readonly mode.
named_scope and nested order clauses
-
Peter Wagenet
This may be fixed in my patch here: http://rails.lighthouseapp.com/p...
-
Maurício Linhares
On Rails 2.3.2 this isn't fixed yet.
+1
Would be really nice to have this fixed.
if key == :conditions && merge if params[key].is_a?(Hash) && hash[method][key].is_a?(Hash) hash[method][key] = merge_conditions(hash[method][key].deep_merge(params[key])) else hash[method][key] = merge_conditions(params[key], hash[method][key]) end elsif key == :include && merge hash[method][key] = merge_includes(hash[method][key], params[key]).uniq elsif key == :joins && merge hash[method][key] = merge_joins(params[key], hash[method][key]) elsif key == :order && merge hash[method][key] = [params[key], hash[method][key]].join(' , ') else hash[method][key] = hash[method][key] || params[key] end -
Erik Andrejko
A patch that includes tests for the desired behavior is attached.
-
Jon
- Assigned user set to Pratik
Still having this problem as you can see in this gist: http://gist.github.com/136140
Probably related to this ticket: #2346 named_scope doesn't override default_scope's :order key
-
Pratik
Hey,
Can we have a patch without new tables please ?
Thanks!
-
Emilio Tagua
You may want to take a look to this ticket/patch, i think that solves this problem:
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets...
