Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
= 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 : firstname.lastname@example.org Copyright (c) 2010, Boguslaw Tarnowski, released under the MIT license