diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-14 20:29:30 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-14 20:29:30 -0300 |
commit | ec6bb3320991df57c00a30c61a03cb5b44942404 (patch) | |
tree | 233b1231971a823734981e4416d2c2597e43431e /activerecord/test/models/comment.rb | |
parent | f2bff250a017b6da76b7587a164643db31ffbf9b (diff) | |
parent | 1d316ac1fd68962782762b02694a1bf9fd4ef44e (diff) | |
download | rails-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/comment.rb')
-rw-r--r-- | activerecord/test/models/comment.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/models/comment.rb b/activerecord/test/models/comment.rb index f82df417ce..bf0162d09b 100644 --- a/activerecord/test/models/comment.rb +++ b/activerecord/test/models/comment.rb @@ -40,3 +40,11 @@ end class VerySpecialComment < Comment end + +class CommentThatAutomaticallyAltersPostBody < Comment + belongs_to :post, class_name: "PostThatLoadsCommentsInAnAfterSaveHook", foreign_key: :post_id + + after_save do |comment| + comment.post.update_attributes(body: "Automatically altered") + end +end |