patrick
unread,Jun 18, 2008, 10:01:01 PM6/18/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to attribute_fu
Hi,
ok-- so another thing that I am kind of confused about is the
following:
if I do this:
<%= f.text_field :blah %>
the html generated is:
<input
id="project_release_attributes__new__0__disc_attributes__new__0_blah"
name="project[release_attributes][new][0][disc_attributes][new][0]
[blah]" type="text" />
however, when I use a select or a checkbox,
<%= check_box "blah","bleh", {}, "1", "0"%>
<%= select :blah, :bleh, 1..20 %>
<input id="bah_baj" name="blah[bleh]" type="checkbox" value="hell
yes" /><input name="blah[bleh]" type="hidden" value="hell no" />
<select id="blah_bleh" name="blah[bleh]"><option value="1">1</option>
etc...
so, what I don't understand is how and why the text_field knows to
preface :blah with project[release_attributes][new][0][disc_attributes]
[new][0], and the others don't ?
-patrick