Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -uNr rails/activerecord/lib/active_record/associations.rb rails-new/activerecord/lib/active_record/associations.rb
- --- rails/activerecord/lib/active_record/associations.rb 2006-07-07 06:58:22.000000000 -0400
- +++ rails-new/activerecord/lib/active_record/associations.rb 2006-07-14 11:40:30.000000000 -0400
- @@ -1150,8 +1150,8 @@
- add_limited_ids_condition!(sql, options, join_dependency) if !using_limitable_reflections?(join_dependency.reflections) && ((scope && scope[:limit]) || options[:limit])
- sql << "GROUP BY #{options[:group]} " if options[:group]
- - sql << "ORDER BY #{options[:order]} " if options[:order]
- + add_order!(sql, options[:order])
- add_limit!(sql, options, scope) if using_limitable_reflections?(join_dependency.reflections)
- return sanitize_sql(sql)
- diff -uNr rails/activerecord/test/base_test.rb rails-new/activerecord/test/base_test.rb
- --- rails/activerecord/test/base_test.rb 2006-07-08 16:35:56.000000000 -0400
- +++ rails-new/activerecord/test/base_test.rb 2006-07-14 12:01:54.000000000 -0400
- @@ -1242,6 +1242,16 @@
- assert_equal 2, topics.first.id
- end
- + def test_scoped_find_order_including_has_many_association
- + developers = Developer.with_scope(:find => { :order => 'developers.salary DESC', :include => :projects }) do
- + Developer.find(:all)
- + end
- + assert developers.size >= 2
- + for i in 1...developers.size
- + assert developers[i-1].salary >= developers[i].salary
- + end
- + end
- +
- def test_base_class
- assert LoosePerson.abstract_class?
- assert !LooseDescendant.abstract_class?
Add Comment
Please, Sign In to add comment