aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/has_many_through_associations_test.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-05-26 10:35:14 +0200
committerYves Senn <yves.senn@gmail.com>2015-05-26 10:35:14 +0200
commitadfab2dcf4003ca564d78d4425566dd2d9cd8b4f (patch)
tree494149351a1e31e7391ee42c859afbdcb35d1f6f /activerecord/test/cases/associations/has_many_through_associations_test.rb
parentb8c31fd9b94cd8ac2963c252fcca40b29c43e75c (diff)
downloadrails-adfab2dcf4003ca564d78d4425566dd2d9cd8b4f.tar.gz
rails-adfab2dcf4003ca564d78d4425566dd2d9cd8b4f.tar.bz2
rails-adfab2dcf4003ca564d78d4425566dd2d9cd8b4f.zip
deprecate `Relation#uniq` use `Relation#distinct` instead.
See #9683 for the reasons we switched to `distinct`. Here is the discussion that triggered the actual deprecation #20198. `uniq`, `uniq!` and `uniq_value` are still around. They will be removed in the next minor release after Rails 5.
Diffstat (limited to 'activerecord/test/cases/associations/has_many_through_associations_test.rb')
-rw-r--r--activerecord/test/cases/associations/has_many_through_associations_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb
index 190cef55c4..1d545af5a5 100644
--- a/activerecord/test/cases/associations/has_many_through_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb
@@ -960,7 +960,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase
assert_equal 1, category.categorizations.where(:special => true).count
end
- def test_joining_has_many_through_with_uniq
+ def test_joining_has_many_through_with_distinct
mary = Author.joins(:unique_categorized_posts).where(:id => authors(:mary).id).first
assert_equal 1, mary.unique_categorized_posts.length
assert_equal 1, mary.unique_categorized_post_ids.length