lib/phony_rails.rb in phony_rails-0.5.0 vs lib/phony_rails.rb in phony_rails-0.6.0
- old
+ new
@@ -28,11 +28,11 @@
number = "#{country_number}#{number}" if not number =~ /^(00|\+)?#{country_number}/
elsif default_country_number = options[:default_country_number] || country_number_for(options[:default_country_code])
# Add default_country_number if missing
number = "#{default_country_number}#{number}" if not number =~ /^(00|\+|#{default_country_number})/
end
- number = Phony.normalize(number) if Phony.plausible?(number)
- return number.to_s
+
+ Phony.normalize(number)
rescue
number # If all goes wrong .. we still return the original input.
end
module Extension