Explicitly load ApplicationHelper in ApplicationController#19
Open
tfe wants to merge 2 commits intoharrison-broadbent:mainfrom
Open
Explicitly load ApplicationHelper in ApplicationController#19tfe wants to merge 2 commits intoharrison-broadbent:mainfrom
tfe wants to merge 2 commits intoharrison-broadbent:mainfrom
Conversation
This seems like possibly an oversight... if ApplicationController exists it seems like other controllers in the engine should inherit from it.
As described here: harrison-broadbent#18 When the Rails app loading this engine is configured with `include_all_helpers = false` (docs here: https://guides.rubyonrails.org/configuring.html#configuring-action-controller), it causes better_mailer_previews's helpers to be inaccessible in its controller/views. To fix this, explicitly load the helper in our ApplicationController instead implicitly relying on Rails's default behavior of including all helpers everywhere.
Owner
|
@tfe thank you for opening that issue (#18) and then drafting this PR! I'm happy in principal with these changes (and it was 100% a mistake not to be inheriting from |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should fix #18. I noticed that the main controller was not inheriting from ApplicationController, so I also changed that. Let me know if that shouldn't be the case, and I can move the
helpercall to the other controller.