Created
February 28, 2024 18:47
-
-
Save rsanheim/32399bdbe72d29804cb2f0bbe9583a45 to your computer and use it in GitHub Desktop.
debugging rails autoloading (classic mode)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from https://makandracards.com/makandra/48754-how-to-debug-rails-autoloading | |
ActiveSupport::Dependencies.singleton_class.prepend(Module.new do | |
def load_missing_constant(*args) | |
Rails.logger.debug "#{__method__}(#{args.map(&:inspect).join(', ')})" | |
super | |
end | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment