lib/phony_rails.rb in phony_rails-0.4.0 vs lib/phony_rails.rb in phony_rails-0.4.1

- old
+ new

@@ -48,10 +48,10 @@ options = options.clone options[:country_code] ||= self.country_code if self.respond_to?(:country_code) attributes.each do |attribute| attribute_name = options[:as] || attribute raise RuntimeError, "No attribute #{attribute_name} found on #{self.class.name} (PhonyRails)" if not self.class.attribute_method?(attribute_name) - write_attribute(attribute_name, PhonyRails.normalize_number(read_attribute(attribute), options)) + self.send("#{attribute_name}=", PhonyRails.normalize_number(self.send(attribute), options)) end end end module ClassMethods