From 938c0ee0455b8e784a771ce31631d9ec376ee6ab Mon Sep 17 00:00:00 2001 From: Alexey Kovyrin Date: Sat, 12 Sep 2009 14:55:34 +0200 Subject: Define autosave association validation methods only when needed. [#3161 state:resolved] Signed-off-by: Eloy Duran --- activerecord/test/models/ship.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/models/ship.rb') 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? } -- cgit v1.2.3