Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby

Zac Barnes
Zac Barnes
8,768 Points

Add pick list to existing form

Hey all you Ruby aficionados! I have a simple (I think) question. I am trying to add a pick list to an existing form in my ruby app and I want to store the choices as strings or as integers so I can call them later. Any help would be appreciated!

1 Answer

Maciej Czuchnowski
Maciej Czuchnowski
36,440 Points

Well, first you would need to add a field to the model related to this form (using a migration) and then add some radio buttons to the view (form).

Zac Barnes
Zac Barnes
8,768 Points

It worked! Thank you!