lib/phony_rails.rb in phony_rails-0.14.0 vs lib/phony_rails.rb in phony_rails-0.14.1

- old
+ new

@@ -142,10 +142,10 @@ end attributes.each do |attribute| attribute_name = options[:as] || attribute raise("No attribute #{attribute_name} found on #{self.class.name} (PhonyRails)") unless self.class.attribute_method?(attribute_name) new_value = PhonyRails.normalize_number(send(attribute), options) - send("#{attribute_name}=", new_value) if new_value + send("#{attribute_name}=", new_value) if new_value || attribute_name != attribute end end def assign_values_for_phony_symbol_options(options) symbol_options = [:country_number, :default_country_number, :country_code, :default_country_code]