create a dropdown menu in rails forum

My database has a list of games and a junction table for the characters in each game. My question is, how do I show the game list in a drop down, and when the game is selected show the character in another dropdown? I am also trying to make the characters change if another game is selected. How would I accomplish this?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


There is not really enough information to assist you right now. What are you using to run your site within rails? What type of framework are you using for your UI?

How are you grabbing the list of games and characters?

It’s important when asking for help to provide as detailed information as possible. This is so those helping you can replicate your issue or situation. Currently it’s not clear enough to answer your question. We would need more information on how exactly you are doing things.