Sha256: 972fa23538749183140be8261638f85afb970be97363468101e0b9b94f383ca4
Contents?: true
Size: 614 Bytes
Versions: 1
Compression:
Stored size: 614 Bytes
Contents
module PluginAWeek #:nodoc: # Adds a generic implementation for dealing with phone numbers module HasPhoneNumbers def self.included(base) #:nodoc: base.class_eval do extend PluginAWeek::HasPhoneNumbers::MacroMethods end end 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 end ActiveRecord::Base.class_eval do include PluginAWeek::HasPhoneNumbers end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
has_phone_numbers-0.0.4 | lib/has_phone_numbers.rb |