Skip to content

Commit

Permalink
Merge pull request #31 from iknow/handle-connection-error
Browse files Browse the repository at this point in the history
Handle an additional case of ActiveRecord::DatabaseConnectionError
  • Loading branch information
chrisandreae authored Jan 8, 2024
2 parents 13664f1 + e5e05c0 commit a35cc23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/persistent_enum/acts_as_enum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def initialize_acts_as_enum(enum_spec)
if table_exists?
all_values.concat(unscoped { where.not(id: required_values) })
end
rescue ActiveRecord::NoDatabaseError
rescue *PersistentEnum::MISSING_DATABASE_ERRORS
# Nothing additional to cache.
end

Expand Down
2 changes: 1 addition & 1 deletion lib/persistent_enum/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module PersistentEnum
VERSION = '1.2.7'
VERSION = '1.2.8'
end

0 comments on commit a35cc23

Please sign in to comment.