lib/phony_rails.rb in phony_rails-0.2.1 vs lib/phony_rails.rb in phony_rails-0.2.2

- old
+ new

@@ -47,10 +47,10 @@ 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| attribute_name = options[:as] || attribute - raise RuntimeError, "No attribute #{attribute_name} found on #{self.class.name} (PhonyRails)" if not self.attribute_method?(attribute_name) + 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)) end end end