Sha256: 599fc5adb2b3730bb59dd96426d3676e527aad7fcc30225593143d4b6b30ce3e
Contents?: true
Size: 675 Bytes
Versions: 10
Compression:
Stored size: 675 Bytes
Contents
module SmsOnRails class Outbound < ActiveRecord::Base set_table_name 'sms_outbounds' belongs_to :draft, :class_name => 'SmsOnRails::Draft', :foreign_key => :sms_draft_id belongs_to :phone_number, :class_name => 'SmsOnRails::PhoneNumber', :foreign_key => :sms_phone_number_id #adding this here instead of support since might not want it #for performance reasons validates_uniqueness_of :sms_phone_number_id, :scope => :sms_draft_id, :message => 'is already included as an outbound for this draft', :if => Proc.new { |outbound| outbound.sms_draft_id } include SmsOnRails::ModelSupport::Outbound end end
Version data entries
10 entries across 10 versions & 3 rubygems