The injection of the CloudinaryHelper module can happen lazily when ActionView::Base is loaded by some other code needing it, and there is no reason to trigger the loading early in the railtie.
A consequence of this change is that you can avoid the loading of ActionView::Base altogether in some cases, e.g. if running a specific test that does not need it, or when opening a rails console.
This aligns the behavior with the loading of Cloudinary::CloudinaryController which happens lazily too (see railtie.rb).
What does this PR address?
[x] GitHub issue (Add reference - #533)
[ ] Refactoring
[ ] New feature
[x] Bug fix
[ ] Adds more tests
Are tests included?
[ ] Yes
[x] No (railtie not tested)
Reviewer, please note:
Checklist:
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[x] I ran the full test suite before pushing the changes and all the tests pass.
Brief Summary of Changes
The injection of the CloudinaryHelper module can happen lazily when ActionView::Base is loaded by some other code needing it, and there is no reason to trigger the loading early in the railtie.
A consequence of this change is that you can avoid the loading of ActionView::Base altogether in some cases, e.g. if running a specific test that does not need it, or when opening a rails console.
This aligns the behavior with the loading of
Cloudinary::CloudinaryController
which happens lazily too (see railtie.rb).What does this PR address?
Are tests included?
Reviewer, please note:
Checklist: