Giter VIP home page Giter VIP logo

pl_cities's Introduction

= PL Cities

This plugin contains ActiveRecord Models and fixtures for Polish cities, regions, communities and counties (miasta, województwa, gminy i powiaty).

This is beta version. Please check and let me know if something doesn't work ;)

== Install
  
  Plugin generator will generate migrations for tables named [city, community,county, region] 
  so if you already have same tables you need to rename them!
  
  Migration & Data
  
  ./script/generate pl_cities
  rake db:migrate
  rake db:fixtures:load

== Example

  >> city = City.find_by_name("Szczecin")
  => #<City id: 896, region_id: 32, county_id: 62, community_id: 1, name: "Szczecin", created_at: "2010-03-15 17:30:01", updated_at: "2010-03-15 17:30:01">

  >> region = city.region
  => #<Region id: 16, country_id: 161, code: 32, name: "zachodniopomorskie", name_ext: "województwo", created_at: "2010-03-15 17:30:04", updated_at: "2010-03-15 17:30:04">

  >> counties = region.communities
  List of communities in West Pomeranian Voivodship


== Contact

Any bugs, questions, comments please feel free to email me : [email protected]

Copyright (c) 2010,  Boguslaw Tarnowski, released under the MIT license

pl_cities's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.