From 5dbc9d40a49f5f0f50c2f3ebe6dda942f0e61562 Mon Sep 17 00:00:00 2001 From: Lance Ivy Date: Sun, 8 Feb 2009 14:23:35 +0100 Subject: Changed API of NestedAttributes to take an array, or hash with index keys, of hashes that have the id on the inside of the attributes hash and updated the FormBuilder to produce such hashes. Also fixed NestedAttributes with composite ids. Signed-off-by: Michael Koziarski Signed-off-by: Eloy Duran [#1892 state:committed] --- activerecord/test/models/pirate.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/models/pirate.rb') diff --git a/activerecord/test/models/pirate.rb b/activerecord/test/models/pirate.rb index 6a2416a05c..7bc50e0e7b 100644 --- a/activerecord/test/models/pirate.rb +++ b/activerecord/test/models/pirate.rb @@ -10,7 +10,7 @@ class Pirate < ActiveRecord::Base has_many :birds accepts_nested_attributes_for :parrots, :birds, :allow_destroy => true, :reject_if => proc { |attributes| attributes.empty? } - accepts_nested_attributes_for :ship, :allow_destroy => true + accepts_nested_attributes_for :ship, :allow_destroy => true, :reject_if => proc { |attributes| attributes.empty? } validates_presence_of :catchphrase end -- cgit v1.2.3