aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/lib/active_record/locking/optimistic.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/locking/optimistic.rb b/activerecord/lib/active_record/locking/optimistic.rb
index 531f104c02..ce0a165660 100644
--- a/activerecord/lib/active_record/locking/optimistic.rb
+++ b/activerecord/lib/active_record/locking/optimistic.rb
@@ -65,7 +65,7 @@ module ActiveRecord
end
def attributes_from_column_definition
- result = super
+ result = self.class.column_defaults.dup
# If the locking column has no default value set,
# start the lock version at zero. Note we can't use