Related_collection_select / related_select_form problem

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:into_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’

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs