# Problem with collection\_select

**URL:** <https://www.ruby-forum.com/t/problem-with-collection-select/137023>\
**Category:** Rails\
**Created:** [May 8, 2008, 11:28am UTC](https://www.ruby-forum.com/t/problem-with-collection-select/137023 "2008-05-08T11:28:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![williamn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/6bbea6/32.png) [@williamn](https://www.ruby-forum.com/u/williamn)\
**Post date:** [May 8, 2008, 11:28am UTC](https://www.ruby-forum.com/t/problem-with-collection-select/137023/1 "2008-05-08T11:28:59Z")

</div>

Hi all.

I have a problem with collection\_select, hope you guys can help me.

User has one Address, and Address has one Province. Here are my  
models :

models/user.rb

class User \< ActiveRecord::Base  
has\_one :address, :dependent =\> :destroy  
…

models/address.rb

class Address \< ActiveRecord::Base  
has\_one :province  
belongs\_to :user  
…

models/province.rb

class Province \< ActiveRecord::Base  
belongs\_to :country, :address  
…

I need to populate a select tag contains list of all provinces. How  
can I do that? I’ve tried use collection\_select but isn’t working.

Thank you.

–William
