lib/phony_rails.rb in phony_rails-0.11.0 vs lib/phony_rails.rb in phony_rails-0.12.0

- old
+ new

@@ -78,10 +78,10 @@ # # It checks your model object for a a country_code attribute (eg. 'NL') to do the normalizing so make sure # you've geocoded before calling this method! def phony_normalize(*attributes) options = attributes.last.is_a?(Hash) ? attributes.pop : {} - options.assert_valid_keys :country_code, :default_country_code, :as + options.assert_valid_keys :country_number, :default_country_number, :country_code, :default_country_code, :add_plus, :as if options[:as].present? raise ArgumentError, ':as option can not be used on phony_normalize with multiple attribute names! (PhonyRails)' if attributes.size > 1 end # Add before validation that saves a normalized version of the phone number