diff options
author | Guo Xiang Tan <tgx_world@hotmail.com> | 2018-08-21 23:23:17 +0800 |
---|---|---|
committer | Guo Xiang Tan <tgx_world@hotmail.com> | 2018-09-03 13:34:24 +0800 |
commit | 90240f664c1c9e294f4230431fe2284ded19b58c (patch) | |
tree | 06c3d7f1fd368fff3255f0b5bd5bdfdf3455661d /activerecord/test/models/contract.rb | |
parent | f3fe56c7326ed38f218c4c61e3395052e9d75d71 (diff) | |
download | rails-90240f664c1c9e294f4230431fe2284ded19b58c.tar.gz rails-90240f664c1c9e294f4230431fe2284ded19b58c.tar.bz2 rails-90240f664c1c9e294f4230431fe2284ded19b58c.zip |
Fix regression setting children record in parent before_save callback.
Diffstat (limited to 'activerecord/test/models/contract.rb')
-rw-r--r-- | activerecord/test/models/contract.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/models/contract.rb b/activerecord/test/models/contract.rb index f273badd85..3f663375c4 100644 --- a/activerecord/test/models/contract.rb +++ b/activerecord/test/models/contract.rb @@ -20,3 +20,7 @@ class Contract < ActiveRecord::Base @bye_count += 1 end end + +class NewContract < Contract + validates :company_id, presence: true +end |