Ruby on Rails Tuesday, November 30, 2010

Thanks Frank. I finally found this post on the forum that points out what you have. It
is interesting that the form_for declaration in the view has to be
something like follows

<% form_for @modelname do |f| %>

instead of

<% form_for :modelname do |f| %>

Don't yet understand why this makes a difference but that is what makes
the difference and posts data with nested model name appended with
"attributes" as you point below.

Thanks for the feedback - very much appreciated. Past that hurdle and
onto the next one.


Frederick Cheung wrote in post #965073:
> On Nov 28, 10:08pm, skt <> wrote:
>> "chkhw"=>"1"}}
>> "name" is a string field for filename in UploadedAttachments model (I
>> am going to use that model for storing uploaded attachments but taking
>> incremental steps - getting just the name for now) and
>> grade_section_id is passed in so I create the model through
>> ClassCalendar
> This data doesn't look like what the nested_attributes stuff looks
> like - I would expected it to be more like
> 'uploaded_attachments_attributes' => {{'0' => {'name' => 'Test 2'}}
> What does your form look like?
> Fred

Posted via

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
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment