lib/phony_rails.rb in phony_rails-0.0.8 vs lib/phony_rails.rb in phony_rails-0.0.9
- old
+ new
@@ -53,9 +53,10 @@
private
# This methods sets the attribute to the normalized version.
# It also adds the country_code (number), eg. 31 for NL numbers.
def set_phony_normalized_numbers(attributes, options = {})
+ options = options.clone
options[:country_code] ||= self.country_code if self.respond_to?(:country_code)
attributes.each do |attribute|
write_attribute(attribute, PhonyRails.normalize_number(read_attribute(attribute), options))
end
end
\ No newline at end of file