Browse files

revert_to now writes attributes via hash-style assignment instead of …

…directly in order to prevent running a custom setter on a value twice.
  • Loading branch information...
1 parent 28ba061 commit efc726d055ac75e3684b7272561e7f9d95735738 Brian Rose & Mike Barinek committed with technoweenie Jul 27, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/acts_as_versioned.rb
@@ -332,7 +332,7 @@ def altered?
# Clones a model. Used when saving a new version or reverting a model's version.
def clone_versioned_model(orig_model, new_model)
self.class.versioned_columns.each do |col|
- new_model.send("#{}=", orig_model.send( if orig_model.has_attribute?(
+ new_model[] = orig_model.send( if orig_model.has_attribute?(
if orig_model.is_a?(self.class.versioned_class)

0 comments on commit efc726d

Please sign in to comment.