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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OFN Domains] Breaking OFN into domains - POC cookies inside an engine #2521
[OFN Domains] Breaking OFN into domains - POC cookies inside an engine #2521
Changes from 5 commits
d170a4d
dc5eb64
bded530
95f2f92
c22ac00
a23b1b9
b1c7e6c
9211053
3cf1002
574f031
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is the purpose of this to allow access from within the engine to the helpers attached to the main ApplicationController? Wait, no... it's inheriting from ::Base, not our main ApplicationController. My mistake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, this is a separate app, I dont think we will inherit from the main app app_controller. We want this app to be a different and separate app. We will need to see what we do what common code, but I dont think it should be through extending the main app_controller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this need to be overridden instead of using the regular ApplicationController value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I guess I'm a bit confused about how this and the main ApplicationController will work together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the easiest way to think about an engine is to think of it as a separate app (from the guide "Engines can be considered miniature applications").
we can get to the engine code through requiring its modules and classes but the main way to get to engine will be through its routes (there's a new entry on the main app routes to include all the routes of this engine), so this is a different app and so we extend ActionController::Base.
Actually, this is a good example of where we will get the opportunity to better organize our code. If you look at the main ApplicationController you see it's contains code relate to embedded_shopfront code, this code can be moved to this Web module ApplicationController and removed from the main app and thus, cleaning up this code from the other spaces, like the unrelated backoffice code.
the reference for engines is this: https://guides.rubyonrails.org/engines.html