diff options
author | Alexey Kovyrin <alexey@kovyrin.net> | 2009-09-12 14:55:34 +0200 |
---|---|---|
committer | Eloy Duran <eloy.de.enige@gmail.com> | 2009-09-12 16:04:36 +0200 |
commit | 938c0ee0455b8e784a771ce31631d9ec376ee6ab (patch) | |
tree | 22141b1db8c00aac3455f2ec5adbe6fa5227eacd /activerecord/test/models/ship.rb | |
parent | 580ec0dccde075330abe68eb13badb03b225f9b4 (diff) | |
download | rails-938c0ee0455b8e784a771ce31631d9ec376ee6ab.tar.gz rails-938c0ee0455b8e784a771ce31631d9ec376ee6ab.tar.bz2 rails-938c0ee0455b8e784a771ce31631d9ec376ee6ab.zip |
Define autosave association validation methods only when needed. [#3161 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
Diffstat (limited to 'activerecord/test/models/ship.rb')
-rw-r--r-- | activerecord/test/models/ship.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/models/ship.rb b/activerecord/test/models/ship.rb index 06759d64b8..d0df951622 100644 --- a/activerecord/test/models/ship.rb +++ b/activerecord/test/models/ship.rb @@ -1,7 +1,7 @@ class Ship < ActiveRecord::Base self.record_timestamps = false - belongs_to :pirate + belongs_to :pirate, :validate => true has_many :parts, :class_name => 'ShipPart', :autosave => true accepts_nested_attributes_for :pirate, :allow_destroy => true, :reject_if => proc { |attributes| attributes.empty? } |