Closed kg8m closed 1 year ago
@jaredonline I am sorry to bother you, but could you please check this pull request?
Hey @kg8m and folks, sorry it's taken me 2 months to take a look at this. I will merge and roll this out today, thank you for the patch.
Thanks a lot for your review and merge!
Fixes #75.
Zeitwerk uses Ruby's built-in
autoload
, anddefined?
for an autoload constant always returns"constant"
. Sodefined?(::ApplicationController)
always returns"constant"
in some situations.After this pull request, GoogleAuthenticatorRails gem will check if
ApplicationController
is loaded or not by Active Support'sdescendants
instead ofdefined?
. This new way doesn't depend on Ruby'sautoload
.