Frederick Cheung wrote:
> On 23 Feb 2009, at 15:57, sa 125 wrote:
>>                          { "id" => "2", "name" => "mow lawn" },
>> { "1" => { "name" => 'buy milk',
>>           "start" => '10:00',
>>           "end" => '10:30' }
>>  "2" => {..}...}
>>
> 
> I'm guessing the problem here is new records ? the easiest way out of
> here is to drop all the :index => nil, but if the record is new the
> call fields_for ..., :index => 'something'
> 
> new records would then appear with that key in the task_attributes
> hash (obviously make the index unique)
> 
> Fred


I did as you proposed and seperated the new record from the edited one. 
I get the hash I wanted indexed by id (for edit), but apparently rails 
doesn't like it and throws an error:

Conflicting types for parameter containers. Expected an instance of 
Array but found an instance of Hash..
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to