Skip to content

Commit b51606d

Browse files
committed
Revert behavior of #schema_default from #677
1 parent dce2ac6 commit b51606d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/annotate/annotate_models.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def quote(value)
213213
end
214214

215215
def schema_default(klass, column)
216-
quote(klass.columns.find { |x| x.name.to_s == column.name.to_s }.try(:default))
216+
quote(klass.column_defaults[column.name])
217217
end
218218

219219
def retrieve_indexes_from_table(klass)

0 commit comments

Comments
 (0)