Sha256: 8a2f02a966b50be2b5a910610da998635c38c32ea0259cbada06945e896ae2a2
Contents?: true
Size: 400 Bytes
Versions: 3
Compression:
Stored size: 400 Bytes
Contents
# Adds a generic implementation for dealing with regions, countries, and # addresses module HasAddresses module MacroMethods # Creates the following association: # * +addresses+ - All addresses associated with the current record def has_addresses has_many :addresses, :as => :addressable end end end ActiveRecord::Base.class_eval do extend HasAddresses::MacroMethods end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
has_addresses-0.5.2 | lib/has_addresses.rb |
has_addresses-0.5.0 | lib/has_addresses.rb |
has_addresses-0.5.1 | lib/has_addresses.rb |