lib/simple_model/base.rb in simple_model-1.1.0 vs lib/simple_model/base.rb in simple_model-1.1.1

- old
+ new

@@ -120,10 +120,11 @@ def persisted? saved? end def before_attribute_set(method,val) - send("#{method.to_s}_will_change!") unless val == instance_variable_get("@#{method.to_s}") + change_methods_str = "#{method.to_s}_will_change!".to_sym + send(change_methods_str) if val != instance_variable_get("@#{method.to_s}") && self.respond_to?(change_methods_str.to_sym) end private # Skeleton for action instance methods \ No newline at end of file