app/models/unidom/contact/china/mobile_phone_number.rb in unidom-contact-china-1.1.1 vs app/models/unidom/contact/china/mobile_phone_number.rb in unidom-contact-china-1.1.2
- old
+ new
@@ -16,10 +16,10 @@
validates :area_code, numericality: { integer_only: true }
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 }
+ scope :serial_number_is, ->(serial_number) { where serial_number: serial_number }
before_validation do
self.phone_number = phone_number.to_s
self.network_identification_number = phone_number[0..2]
self.area_code = phone_number[3..6]