diff options
author | Tarmo Tänav <tarmo@itech.ee> | 2008-09-26 20:57:56 +0300 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-09-26 20:09:39 +0200 |
commit | ea609b265ffc30cac00bf09a262027f96964ed6f (patch) | |
tree | 6877969d5e0394c4126e583328c2cb1ca7bd5262 /activerecord/lib/active_record | |
parent | 4d9a7ab5f5c28820e0b076f9ca44bdd20e19e6ea (diff) | |
download | rails-ea609b265ffc30cac00bf09a262027f96964ed6f.tar.gz rails-ea609b265ffc30cac00bf09a262027f96964ed6f.tar.bz2 rails-ea609b265ffc30cac00bf09a262027f96964ed6f.zip |
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>
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/validations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index 684fb1de88..ed366527ce 100644 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -472,7 +472,7 @@ module ActiveRecord 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) } |