Hi I have been using the helper related_select_form, declared prototype
right and everything, but I keep getting an error which says wrong
number of arguments (1 for 0)
my related_collection_select is as follow (based on related_select_form
example)
Can anyone give me a light from something to do, I tried taking
arguments of other tables, other usages .... Thanks in advance !
my tables
aluno : id , id_curso , id_faculdade
faculdade : id, nome
curso : id, id_faculdade, nome
my related_select_form
<%= collection_select(
:aluno, :id_faculdade, Faculdade.find(:all), :id, :nome) %>
<%= related_collection_select(
:aluno, :id_curso, [:curso, :id],
Curso.find(:all), :id, :nome_curso, :id_faculdade) %>
I receive error in this line :
85: :aluno, :id_curso, [:curso, :id],
with the following errors :
#{RAILS_ROOT}/app/helpers/related_select_form_helper.rb:83:in `value''
#{RAILS_ROOT}/app/helpers/related_select_form_helper.rb:83:in
`to_related_collection_select_tag''
#{RAILS_ROOT}/app/helpers/related_select_form_helper.rb:66:in
`related_collection_select''
#{RAILS_ROOT}/app/views/aluno/_form.rhtml:85:in
`_run_rhtml_aluno__form''
#{RAILS_ROOT}/app/views/aluno/new.rhtml:4:in `_run_rhtml_aluno_new''
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---