Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

dont send - just copy the column

  • Loading branch information...
commit 76173fd4bcbf756b9751fc358f95d2b4f5eb5bd7 1 parent f7eaf9b
@twalpole authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/acts_as_versioned.rb
View
3  lib/acts_as_versioned.rb
@@ -332,7 +332,8 @@ 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[col.name] = orig_model.send(col.name) if orig_model.has_attribute?(col.name)
+# new_model[col.name] = orig_model.send(col.name) if orig_model.has_attribute?(col.name)
+ new_model[col.name] = orig_model[col.name] if orig_model.has_attribute?(col.name)
end
if orig_model.is_a?(self.class.versioned_class)
Please sign in to comment.
Something went wrong with that request. Please try again.