Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Demonstrates a reference implementation for handling countries, regions, and addresses
Ruby
tag: v0.1.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app/models
db/migrate
lib
test
CHANGELOG
MIT-LICENSE
README
Rakefile
init.rb

README

= has_addresses

+has_addresses+ demonstrates a reference implementation for handling countries, regions, and addresses.

== Resources

Wiki

* http://wiki.pluginaweek.org/Has_addresses

API

* http://api.pluginaweek.org/has_addresses

Development

* http://dev.pluginaweek.org/browser/trunk/has_addresses

Source

* http://svn.pluginaweek.org/trunk/has_addresses

== Description

Countries, regions, and addresses are all simple models whose data and
functionality should be able to be standardized across multiple applications.
has_addresses adds support for countries and regions based on the ISO 3166 and
ISO 3166-2 standard.  The data for these standards is obtained through the
open-source Debian package, iso-codes.

Along with the simple Country and Region models, addresses can be defined and
integrated based on the data in these models.  Addresses are minimalistic in
terms of the type of data required.

== Usage

Note that this is a reference implementation and, most likely, should be
modified for your own usage.

=== Example

  address = Address.new(
    :street_1 => '1600 Amphitheatre Parkway',
    :city => 'Mountain View',
    :region => 'California',
    :postal_code => '94043'
  )
  address.single_line # => "1600 Amphitheatre Parkway, Mountain View, California  94043, United States"

== Testing

Before you can run any tests, the following gem must be installed:
* plugin_test_helper[http://wiki.pluginaweek.org/Plugin_test_helper]

== Dependencies

* plugins_plus[http://wiki.pluginaweek.org/Plugins_plus]
* acts_as_enumeration[http://wiki.pluginaweek.org/Acts_as_enumeration]
Something went wrong with that request. Please try again.