diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2015-10-29 13:41:24 -0600 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2015-10-29 13:43:23 -0600 |
commit | a59a4fbdb0e6ac27f53240524d803d7d5f933955 (patch) | |
tree | 73f6e3f71502871b88634038d2f7f39fa2fee68b /activerecord/test/cases/associations | |
parent | 38061a7becdcfb267a37bc200b846196bd32e2b1 (diff) | |
download | rails-a59a4fbdb0e6ac27f53240524d803d7d5f933955.tar.gz rails-a59a4fbdb0e6ac27f53240524d803d7d5f933955.tar.bz2 rails-a59a4fbdb0e6ac27f53240524d803d7d5f933955.zip |
Never pass `nil` to `order`
This is part of a refactoring to make it easier to allow `order` to use
sanitize like just about everything else on relation. The deleted test
doesn't give any reasoning as to why passing `nil` to `order` needs to
be supported, and it's rather nonsensical. I can almost see allowing an
empty string being passed (though I'm tempted to just disallow it...)
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r-- | activerecord/test/cases/associations/eager_test.rb | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb index bcc8455d0d..0c09713971 100644 --- a/activerecord/test/cases/associations/eager_test.rb +++ b/activerecord/test/cases/associations/eager_test.rb @@ -1221,12 +1221,6 @@ class EagerAssociationTest < ActiveRecord::TestCase end end - def test_join_eager_with_nil_order_should_generate_valid_sql - assert_nothing_raised(ActiveRecord::StatementInvalid) do - Post.includes(:comments).order(nil).where(:comments => {:body => "Thank you for the welcome"}).first - end - end - def test_deep_including_through_habtm # warm up habtm cache posts = Post.all.merge!(:includes => {:categories => :categorizations}, :order => "posts.id").to_a |