Module: SmsOnRails::ModelSupport::PhoneNumberAssociations
- Included in:
- PhoneNumber
- Defined in:
- lib/sms_on_rails/model_support/phone_number_associations.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/sms_on_rails/model_support/phone_number_associations.rb', line 4 def self.included(base) base.send :has_many, :outbounds, :class_name => 'SmsOnRails::Outbound', :foreign_key => 'sms_phone_number_id', :dependent => :delete_all base.send :belongs_to, :carrier, :class_name => 'SmsOnRails::PhoneCarrier', :foreign_key => :carrier_id end |