Skip to content

markmcdonald51/addressable

Repository files navigation

address => Simple address model for use with PostGIS

Helps with writing PostGIS addresses.

This is a simple address model that is useful for using in all applications that need a good geo reference. This class strives to be GIS, but is a work in progress. The GIS functions (acts_as_geom) will only work with PostGIS and Postgresql.

Get it and Get going…

Install the plugin:

$ script/plugin install git://github.com/markmcdonald51/addressable.git

Run the migration

$ script/generate address_migration new

Example

I use this in many of my models as an addressable polymorphic association as such:

has_one :address, :as => :addressable, 
  :class_name => 'Address', :dependent => :destroy

or

has_many :addresses, :as => :addressable,  
  :class_name => 'Address', :dependent => :destroy

About

a model for postgis/geo polymorphic addresses

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages