If anyone ever has this problem ...write me :)
Stuart
On 9/28/06, Dark Ambient
<sambient-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I was using formhelpers before with 3 fields that are dependent
> dropdowns and using some ajax to perform the magic.
> Now that''s I''ve had to switch to form_for I''m
finding one of two problems.
> Renaming the fields to f.select generates an undefined method merge OR
> leaving them be leaves them working in the form but the form is either
> not grabbing the value or putting it into the database.
>
> So this is the first field:
> (btw - the name of the attribute the form should input too is
"salary_id)
> <%= select ''salary'', ''id'',
Salary.find(:all).map {|s| [s.name, s.id]}%>
> If I leave it like this, ajax works, but no db input.
>
> if i add the f.select I get:
> undefined method `merge'' for [["Annual", 1],
["Hourly", 2]]:Array
>
> I know this is a tough one , i now have a few hours trying to figure it
out.
> I''ll take gueses even :)
>
> Stuart
>
>
>
> --
> http://en.wikipedia.org/wiki/Dark_ambient
>
--
http://en.wikipedia.org/wiki/Dark_ambient
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---