D
D
Denis Ilyasov2015-01-07 14:29:33
Ruby on Rails
Denis Ilyasov, 2015-01-07 14:29:33

How do you implement work with cities?

It is necessary to implement work with cities in Russia, but I still have little idea how to do it without unnecessary troubles. Please tell us how you work with cities? In short, you need to do the same as on brainstorage, i.e. a text field and a drop-down list that suggests which city is suitable. Perhaps there is a ready-made gem with cities in Russia?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MintTea, 2015-01-07
@ilyasovd

I don’t write in RoR, but here is a universal answer for any mvc framework:
1) Create a table in the database and the corresponding model in the application
2) Fill the table with cities. The list can be taken from here basicdata.ru
3) Attach https://github.com/brianreavis/selectize.js/ in the view, for example
What exactly are you interested in?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question