# How do i get country\_select and select to show values

**URL:** <https://www.ruby-forum.com/t/how-do-i-get-country-select-and-select-to-show-values/131926>\
**Category:** Rails\
**Created:** [March 14, 2008, 1:58pm UTC](https://www.ruby-forum.com/t/how-do-i-get-country-select-and-select-to-show-values/131926 "2008-03-14T13:58:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [March 14, 2008, 1:58pm UTC](https://www.ruby-forum.com/t/how-do-i-get-country-select-and-select-to-show-values/131926/1 "2008-03-14T13:58:14Z")

</div>

Hi i am a newbee at rails and i am using the country\_select and select  
drop down boxes in my new.rhtml I can make these work fine but when i  
try viewing it in my database and show and index they just wont appear,  
I have tried to edited it to how do I go about showing these items  
everywhere i am completely stuck.

if text field = f.text\_field  
then why doesnt country\_select = f.country\_select or f.select?

\<% fields\_for "supplier[address\_attributes][]", address do |f|%\>

**Country**  
\<%= country\_select (:country,"country",["United Kingdom"]) %\>

\<

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [March 14, 2008, 5:46pm UTC](https://www.ruby-forum.com/t/how-do-i-get-country-select-and-select-to-show-values/131926/2 "2008-03-14T17:46:46Z")

</div>

Try referencing f.country instead of f.country\_select. You need to  
use the id of the form field, which is “country” in this case. Take a  
look at the HTML that the browser gets when you’re looking at this  
form - it might help.

If that doesn’t help, please post your related view code, controller  
code, and an output of log/development.log that shows what happens  
when you submit the form. The log output should show you which  
parameters are being passed.

-Kyle

On Mar 14, 7:58 am, Nish P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
