# Related\_collection\_select / related\_select\_form problem

**URL:** <https://www.ruby-forum.com/t/related-collection-select-related-select-form-problem/133162>\
**Category:** Rails\
**Created:** [March 28, 2008, 12:41pm UTC](https://www.ruby-forum.com/t/related-collection-select-related-select-form-problem/133162 "2008-03-28T12:41:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrianod](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c2a13f/32.png) [@adrianod](https://www.ruby-forum.com/u/adrianod)\
**Post date:** [March 28, 2008, 12:41pm UTC](https://www.ruby-forum.com/t/related-collection-select-related-select-form-problem/133162/1 "2008-03-28T12:41:49Z")

</div>

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’
