aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/post.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-14 20:29:30 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-14 20:29:30 -0300
commitec6bb3320991df57c00a30c61a03cb5b44942404 (patch)
tree233b1231971a823734981e4416d2c2597e43431e /activerecord/test/models/post.rb
parentf2bff250a017b6da76b7587a164643db31ffbf9b (diff)
parent1d316ac1fd68962782762b02694a1bf9fd4ef44e (diff)
downloadrails-ec6bb3320991df57c00a30c61a03cb5b44942404.tar.gz
rails-ec6bb3320991df57c00a30c61a03cb5b44942404.tar.bz2
rails-ec6bb3320991df57c00a30c61a03cb5b44942404.zip
Merge pull request #15078 from nbudin/fix_merger_filter_binds_comparison_master
Make filter_binds filter out symbols that are equal to strings Conflicts: activerecord/CHANGELOG.md
Diffstat (limited to 'activerecord/test/models/post.rb')
-rw-r--r--activerecord/test/models/post.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/models/post.rb b/activerecord/test/models/post.rb
index b1e56c14d1..5f01ab0a82 100644
--- a/activerecord/test/models/post.rb
+++ b/activerecord/test/models/post.rb
@@ -208,3 +208,12 @@ class SpecialPostWithDefaultScope < ActiveRecord::Base
self.table_name = 'posts'
default_scope { where(:id => [1, 5,6]) }
end
+
+class PostThatLoadsCommentsInAnAfterSaveHook < ActiveRecord::Base
+ self.table_name = 'posts'
+ has_many :comments, class_name: "CommentThatAutomaticallyAltersPostBody", foreign_key: :post_id
+
+ after_save do |post|
+ post.comments.load
+ end
+end