Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ignore all exceptions for validates_acceptance_of columns fetch so it…

… can run even without a database connection

Signed-off-by: Michael Koziarski <michael@koziarski.com>
  • Loading branch information...
commit 4526e35af89bc8db9d6ba13e4392f3f851a59bb9 1 parent 7d2201d
@tarmo tarmo authored NZKoz committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/validations.rb
View
2  activerecord/lib/active_record/validations.rb
@@ -428,7 +428,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) }
Please sign in to comment.
Something went wrong with that request. Please try again.