params[:milestones] returns an array of milestones, so you''d need to
do something like params[:milestones][0] to get the first one, etc.
Also, most people are using the :index => option on the html helpers
to handle the naming for them.. e.g.:
<%= text_field ''person'', ''ssn'',
''index'' => person_counter, ''maxlength''
=> 9, ''size'' => 9 %>
That being said, I''ve never used Basecamp, so I''m not sure how
they''re doing it.
--Wilson.
On 9/28/05, Adam Groves
<adam.groves-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
>
> Does anyone know how the ''add 10 milestones'' form on
bassecamp works? The
> html for the titles is as follows:
>
> <input type="text" size="30"
name="milestones[1][title]" />
>
> so I presume the line in rhtml is something like:
>
> name="milestones[<%= milelstone.id %>][title][]"
>
> @milestone.update_attributes(params[:milestones]) doesn''t work
though.
> Hmmph.
> Would be grateful for any help.
>
> Adam Grove
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>