Sha256: 697231be87fadfd9b99d511a0bb9d9f05aca6317217fc851f7294fad4a78d8c6
Contents?: true
Size: 1.19 KB
Versions: 7
Compression:
Stored size: 1.19 KB
Contents
= Addresses This project rocks and uses MIT-LICENSE. It allows you use these models: * Country * State (belongs to country) * City (belongs to State) * Neighborhood (belongs to city) * Address (Belongs to Neighborhood and City, because neighborhood is not required) == Installation Add this code to your Gemfile: gem 'addresses', git: 'https://github.com/wilbert/addresses' After this, add this line to your routes: mount Addresses::Engine => "/addresses" Copy migrations to your project and execute than to create tables in your database: rake addresses:install:migrations rake db:migrate If you want populate Contries, States (Brazilian only), Cities (Brazilian only) and Neighborhoods (Brazilian only) use this command: rake addresses Now you can test in console if everything are working: Addresses::Contry.count Use these models in your project as: address = Addresses::Address.new address.street = "Street name" address.number = "Number" address.complement = "Complement of address" address.zipcode = "zipcode" address.city = Address::City.find(city_id) address.neighborhood = Address::Neighborhood.find(neighborhood_id) address.save
Version data entries
7 entries across 7 versions & 1 rubygems