aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-04-15 09:10:00 +0200
committerYves Senn <yves.senn@gmail.com>2015-04-15 09:10:00 +0200
commit5f00ed10dd820b6802168933c2497d17c43c88f5 (patch)
tree6c667f11b0a23a5a86531c0be38e72d1b7d352ac /activerecord/test/cases
parent163de75707dc41924003fb938eb9db61efda9cf1 (diff)
downloadrails-5f00ed10dd820b6802168933c2497d17c43c88f5.tar.gz
rails-5f00ed10dd820b6802168933c2497d17c43c88f5.tar.bz2
rails-5f00ed10dd820b6802168933c2497d17c43c88f5.zip
Revert "Merge pull request #19755 from yuki24/activerecord/support-for-set"
This reverts commit 524d40591eaa2f4d007409bfad386f6b107492eb, reversing changes made to 34d3a6095100245283861ef480a54d0643bbee4c. Reasoning behind the revert are in the PR discussion: https://github.com/rails/rails/pull/19755 - This means that types can no longer cast to/from `Set`, and reasonably work with `where` (we already have this problem for `array`/`json` types on pg) - This adds precedent for every other `Enumerable`, and we can't target `Enumerable` directly. - Calling `to_a` on a `Set` is reasonable.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/relations_test.rb10
1 files changed, 0 insertions, 10 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb
index 7886d9e504..0cf44388fa 100644
--- a/activerecord/test/cases/relations_test.rb
+++ b/activerecord/test/cases/relations_test.rb
@@ -848,16 +848,6 @@ class RelationTest < ActiveRecord::TestCase
}
end
- def test_find_all_using_where_with_a_set
- david = authors(:david)
- mary = authors(:mary)
- set = Set.new([david.id, mary.id])
-
- assert_queries(1) {
- assert_equal [david, mary], Author.where(id: set).to_a
- }
- end
-
def test_exists
davids = Author.where(:name => 'David')
assert davids.exists?