aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/author.rb
diff options
context:
space:
mode:
authorMatthias Zirnstein <matthias.zirnstein@googlemail.com>2014-01-05 17:55:39 +0100
committerMatthias Zirnstein <matthias.zirnstein@googlemail.com>2014-01-05 18:18:07 +0100
commitbf556880f22e759d5de6b203671636d82ecc2f18 (patch)
tree6d8ba88353476208a38c5b1c06db5a0ed5ec537f /activerecord/test/models/author.rb
parent3713e433667ee95caccb53a4062f540405272234 (diff)
downloadrails-bf556880f22e759d5de6b203671636d82ecc2f18.tar.gz
rails-bf556880f22e759d5de6b203671636d82ecc2f18.tar.bz2
rails-bf556880f22e759d5de6b203671636d82ecc2f18.zip
Remove method redefined warnings for test suite
has_many definitions with "name" as singular and as plural e.g. has_many :welcome_posts_with_comment has_many :welcome_posts_with_comments Ruby mentions it with: lib/active_record/associations/builder/collection_association.rb:65: warning: method redefined; discarding old welcome_posts_with_comment_ids lib/active_record/associations/builder/collection_association.rb:65: warning: previous definition of welcome_posts_with_comment_ids was here lib/active_record/associations/builder/collection_association.rb:75: warning: method redefined; discarding old welcome_posts_with_comment_ids= lib/active_record/associations/builder/collection_association.rb:75: warning: previous definition of welcome_posts_with_comment_ids= was here
Diffstat (limited to 'activerecord/test/models/author.rb')
-rw-r--r--activerecord/test/models/author.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/models/author.rb b/activerecord/test/models/author.rb
index 794d1af43d..c197951c71 100644
--- a/activerecord/test/models/author.rb
+++ b/activerecord/test/models/author.rb
@@ -29,7 +29,7 @@ class Author < ActiveRecord::Base
has_many :thinking_posts, -> { where(:title => 'So I was thinking') }, :dependent => :delete_all, :class_name => 'Post'
has_many :welcome_posts, -> { where(:title => 'Welcome to the weblog') }, :class_name => 'Post'
- has_many :welcome_posts_with_comment,
+ has_many :welcome_posts_with_one_comment,
-> { where(title: 'Welcome to the weblog').where('comments_count = ?', 1) },
class_name: 'Post'
has_many :welcome_posts_with_comments,