diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-03-25 15:58:23 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-12-30 10:25:58 +0100 |
commit | 2b12288139f9bad6cf6d058d93af66cdf598dda9 (patch) | |
tree | 439daa4ce91c71baf46906561196ff0323707292 /activerecord/test/models | |
parent | ecb1981bfd3ffaca3a3efd110fc85380ece8191d (diff) | |
download | rails-2b12288139f9bad6cf6d058d93af66cdf598dda9.tar.gz rails-2b12288139f9bad6cf6d058d93af66cdf598dda9.tar.bz2 rails-2b12288139f9bad6cf6d058d93af66cdf598dda9.zip |
AR specific length validator to respect `marked_for_destruction`.
Closes #7247.
Conflicts:
activerecord/CHANGELOG.md
activerecord/test/models/owner.rb
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/owner.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/owner.rb b/activerecord/test/models/owner.rb index 2e3a9a3681..cedb774b10 100644 --- a/activerecord/test/models/owner.rb +++ b/activerecord/test/models/owner.rb @@ -17,6 +17,8 @@ class Owner < ActiveRecord::Base after_commit :execute_blocks + accepts_nested_attributes_for :pets, allow_destroy: true + def blocks @blocks ||= [] end |