fgrehm / letter_opener_web

A web interface for browsing Ruby on Rails sent emails
MIT License
718 stars 112 forks source link

Avoid require_dependency if Zeitwerk is enabled #98

Closed casperisfine closed 5 years ago

casperisfine commented 5 years ago

Ref: https://github.com/rails/rails/pull/37599

That require_dependency is here to workaround a limitation in Rails's Classic autoloader (as explained here).

Since Rails 6, there's a new autoloader available, which doesn't have this limitation, as well as an option to not add autoloaded paths to the global $LOAD_PATH.

That later option breaks latter_opener_web.

@pseudomuto @rafaelfranca @Edouard-Chin @etiennebarrie

casperisfine commented 5 years ago

if Zeitwerk is enabled, we don't need to require dep because it'll deterministically find the correct ApplicationController?

Yep!

casperisfine commented 4 years ago

👋 could we get a new release ?