L12n
l12n creates locations data for you. It's only for Turkey but you can easily improve it.
Requirements
Before generating your application, you will need:
- Ruby ~> 2.0
- Rails ~> 4.0
Usage
First you should install the l12n gem than you can use it for creating new gem.
gem install l12n
gem 'l12n'
Run rake
rake l12n:install:migrations
rake db:migrate
Add the following line into config/routes.rb
mount L12n::Engine => '/locations'
Cities
Get
/locations/cities
Parameters
-
callback
Not required
Response
[
{
id: 1,
name: "Adana"
},
{
id: 2,
name: "Adıyaman"
}
]
Districts
Get
/locations/district
Parameters
-
city_id
Required - callback` Not required
Response
[
{
id: 454,
name: "Sultanbeyli"
},
{
id: 453,
name: "Şile"
}
]
Bugs and Feedback
If you discover any bugs or want to drop a line, feel free to create an issue on GitHub.
http://github.com/lab2023/l12n/issues
Contributing
L12n uses SemVer, and takes it seriously.
Once you've made your great commits:
- Fork project
- Create a topic branch -
git checkout -b my_branch
- Push to your branch -
git push origin my_branch
- Create a Pull Request from your branch
- That's it!
Credits
- L12n is maintained and funded by lab2023 - information technologies
- Thank you to all the contributors!
- The names and logos for lab2023 are trademarks of lab2023, inc.
License
Copyright 2014 lab2023 – information technologies