Sha256: 23be1d72ef8444f0e6911842d8f6588baedf524f70cde1172c7529d9ea733fe6

Contents?: true

Size: 423 Bytes

Versions: 10

Compression:

Stored size: 423 Bytes

Contents

module SmsOnRails
  module ModelSupport
    module PhoneNumberAssociations
      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
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
blythedunham-sms_on_rails-0.1.0 lib/sms_on_rails/model_support/phone_number_associations.rb
sztywny-smsonrails-0.3.3 lib/sms_on_rails/model_support/phone_number_associations.rb
sztywny-smsonrails-0.3.1 lib/sms_on_rails/model_support/phone_number_associations.rb
sztywny-smsonrails-0.3.0 lib/sms_on_rails/model_support/phone_number_associations.rb
sztywny-smsonrails-0.2.3 lib/sms_on_rails/model_support/phone_number_associations.rb
sztywny-smsonrails-0.2.2 lib/sms_on_rails/model_support/phone_number_associations.rb
sztywny-smsonrails-0.2.1 lib/sms_on_rails/model_support/phone_number_associations.rb
sztywny-smsonrails-0.2.0 lib/sms_on_rails/model_support/phone_number_associations.rb
sztywny-smsonrails-0.1.2 lib/sms_on_rails/model_support/phone_number_associations.rb
smsonrails-0.1.2 lib/sms_on_rails/model_support/phone_number_associations.rb