l12n gem creates locations data for you.
Switch branches/tags
Clone or download
Murat Kemal BAYGÜN
Murat Kemal BAYGÜN TB-65 Fix contributors link
1
Latest commit 4576174 Jan 15, 2015
Permalink
Failed to load latest commit information.
app
config
db/migrate #4 Move json string to yaml files. Feb 3, 2014
lib bunp version 1.1.3 May 30, 2014
script #2 Remove unit test and add rspec Feb 3, 2014
spec #2 Remove unit test and add rspec Feb 3, 2014
.gitignore
.rspec #2 Remove unit test and add rspec Feb 3, 2014
.rubocop.yml
CHANGELOG.md bunp version 1.1.3 May 30, 2014
Gemfile #2 Remove unit test and add rspec Feb 3, 2014
Gemfile.lock gemfile fixed May 30, 2014
MIT-LICENSE LAB-31 #time 2m Update README.md and license May 3, 2014
README.md TB-65 Fix contributors link Jan 15, 2015
Rakefile gem created Oct 16, 2013
l12n.gemspec homepage url fixed May 30, 2014

README.md

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:

  1. Fork project
  2. Create a topic branch - git checkout -b my_branch
  3. Push to your branch - git push origin my_branch
  4. Create a Pull Request from your branch
  5. That's it!

Credits

lab2023

License

Copyright 2014 lab2023 – information technologies