-
Notifications
You must be signed in to change notification settings - Fork 699
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
subclass from ActionController::Base not Application controller #434
Conversation
How can you be sure no existing app rely on this to add before_actions to their app? If any app do rely on the current behaviour, how do they keep the existing behaviour? |
Thats a good point - there isn't really a good way to know if anyone is using this. Intuitively I doubt many people are since it would be a pretty complicated setup. In general if you need additions to your controllers you should subclass |
We could do a bigger version bump to make people more aware of this change. |
Can you at least try this branch out on a couple of Shopify channels/apps? It should quickly be obvious if something break. |
@EiNSTeiN- yes we should definitely do that |
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.
Code LGTM, as long as everything checks out with #434 (comment) 👍
@@ -1,5 +1,5 @@ | |||
module ShopifyApp | |||
class SessionsController < ApplicationController | |||
class SessionsController < ActionController::Base | |||
include ShopifyApp::SessionsConcern |
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.
We need to include include ShopifyApp::LoginProtection
here no?
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.
Actually, never mind. I just remembered that LoginProtection
is included in SessionsConcern
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 I get tripped up by that too. Every time I always wonder if anyone is actually using this concern in their own controller or if we could simplify it and move this code into the controller.
@swalkinshaw this one too! |
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.
Seems good 👍
bcd6fbe
to
f3bcad1
Compare
Merging into v8.0.0 branch. We are going to do a full QA after we're done with all the changes for the next major version. |
I'm working on mounting ShopifyApp in an application where most of the code is not part of the Shopify application. One of things I came across is that our ApplicationController defines a few before_actions which interfere with the engine. I think this change makes sense since we wouldn't want ApplicationController to interfere with anything inside the engine.
review
@Hammadk @alanhill