提交 ea609b26 编写于 作者: T Tarmo Tänav 提交者: Michael Koziarski

Ignore all exceptions for validates_acceptance_of columns fetch so it can run...

Ignore all exceptions for validates_acceptance_of columns fetch so it can run even without a database connection
Signed-off-by: NMichael Koziarski <michael@koziarski.com>
上级 4d9a7ab5
......@@ -472,7 +472,7 @@ def validates_acceptance_of(*attr_names)
db_cols = begin
column_names
rescue ActiveRecord::StatementInvalid
rescue Exception # To ignore both statement and connection errors
[]
end
names = attr_names.reject { |name| db_cols.include?(name.to_s) }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册