Skip to content

Commit

Permalink
Rescue ActiveRecord::ConnectionNotEstablished errors during
Browse files Browse the repository at this point in the history
`const_get`

Resolves #2004
  • Loading branch information
KaanOzkan committed Dec 6, 2024
1 parent cc54939 commit 4cddfc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tapioca/runtime/reflection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def constant_defined?(constant)
end
def constantize(symbol, inherit: false, namespace: Object)
namespace.const_get(symbol, inherit)
rescue NameError, LoadError, RuntimeError, ArgumentError, TypeError
rescue NameError, LoadError, RuntimeError, ArgumentError, TypeError, ActiveRecord::ConnectionNotEstablished
UNDEFINED_CONSTANT
end

Expand Down

0 comments on commit 4cddfc3

Please sign in to comment.