Rails 3.1 interdependent select dropdown lists

2019-04-16 00:12发布

My database structure:

Countries(id,title,prefix)  
Towns(id,country_id,title)
Street(id,town_id,title)

I need to create interdependent select dropdown list: when i select Country, ajax loading towns from this country into select tag, and when i select Street, ajax loading street by selected town_id into street select tag. I want to ask whether there is a Rails way to generate this list. Thank you.

1条回答
SAY GOODBYE
2楼-- · 2019-04-16 00:57

I found some tutorial to make what you want :

查看更多
登录 后发表回答