diff options
Diffstat (limited to 'activerecord/test/models/ship.rb')
-rw-r--r-- | activerecord/test/models/ship.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/models/ship.rb b/activerecord/test/models/ship.rb index c46e27f3ae..06759d64b8 100644 --- a/activerecord/test/models/ship.rb +++ b/activerecord/test/models/ship.rb @@ -4,7 +4,7 @@ class Ship < ActiveRecord::Base belongs_to :pirate has_many :parts, :class_name => 'ShipPart', :autosave => true - accepts_nested_attributes_for :pirate, :allow_destroy => true + accepts_nested_attributes_for :pirate, :allow_destroy => true, :reject_if => proc { |attributes| attributes.empty? } validates_presence_of :name -end
\ No newline at end of file +end |