app/models/unidom/contact/china/mobile_phone_number.rb in unidom-contact-china-0.3 vs app/models/unidom/contact/china/mobile_phone_number.rb in unidom-contact-china-0.4
- old
+ new
@@ -11,10 +11,10 @@
validates :phone_number, presence: true, length: { is: self.columns_hash['phone_number'].limit }, numericality: { integer_only: true }, format: FORMAT_VALIDATION_REGEX
validates :network_identification_number, presence: true, length: { is: self.columns_hash['network_identification_number'].limit }, numericality: { integer_only: true }
validates :serial_number, presence: true, length: { is: self.columns_hash['serial_number'].limit }, numericality: { integer_only: true }
validates :area_code, numericality: { integer_only: true }
- has_many :contact_subscription, class_name: 'Unidom::Contact::ContactSubscription', as: :contact
+ has_many :contact_subscriptions, class_name: 'Unidom::Contact::ContactSubscription', as: :contact
scope :phone_number_is, ->(phone_number) { where phone_number: phone_number }
scope :network_identification_number_is, ->(network_identification_number) { where network_identification_number: network_identification_number }
scope :area_code_is, ->(area_code) { where area_code: area_code }
scope :serial_number_is, ->(serial_number) { where serial_number: phone_number }