Sha256: 8bdf649c9b6140f9cfda3d097167f4618952d5bd7ce410ce9cee106d97534c1f
Contents?: true
Size: 417 Bytes
Versions: 1
Compression:
Stored size: 417 Bytes
Contents
# Adds a generic implementation for dealing with phone numbers module HasPhoneNumbers module MacroMethods # Creates the following association: # * +phone_number+ - All phone numbers associated with the current record. def has_phone_numbers has_many :phone_numbers, :as => :phoneable end end end ActiveRecord::Base.class_eval do extend HasPhoneNumbers::MacroMethods end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
has_phone_numbers-0.1.0 | lib/has_phone_numbers.rb |