Hi,
I''m getting a "wrong number of arguments (0 for 1)" from my
view when
using form.select()
I could not find anything helpful in the API docs.
<%= @lists = Number.find(:all, :order => "list", :conditions
=>
"company = ''monsieur_martin'' ").map {|u| [u.list,
u.id] } %>
<%= form.select(:list, @lists) %>
When checking the first line in console, it returns every
list.>> @lists = Number.find(:all, :order => "list", :conditions
=>
"company = ''monsieur_martin ").map {|u| [u.list] }
=> [[""], ["gutta"]]
>> form.select(:list, @lists)
NameError: undefined local variable or method `form'' for
#<Object:0xb7f4a9f4>
from (irb):20
I''m running Rails 1.2.2. Any suggestions to what I do wrong, or which
pages I should read better in the API? :)
Best Regards,
Martin Stabenfeldt
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---