-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[WIP] Always use the default store #2022
Conversation
This commit avoids doing 2 extra queries for every request (solidusio#1971) even when solidus store is not using solidus_multi_domain extension. This logic has now been moved to the solidus_multi_domain extension since it is needed only when multiple stores are expected (solidusio-contrib/solidus_multi_domain#67).
They'll be moved in solidus_multi_domain. This commit also reorganizes a bit api orders specs for the displaying orders part.
a18dd4c
to
01ae9b6
Compare
Thanks! I haven't used more than 1 store, but if it is a requirement to use the |
I think we've been moving more towards having the multi_domain behaviour included in core, just because of how frequent a need it is (and how invasive the changes are otherwise). But I appreciate how wasteful those three queries are on single-store apps. Maybe we want to include several store selectors side-by-side |
I like the idea of provided selectable Store selector classes. Why do we even still have this extension? Shouldn't we deprecate it? |
Since the direction is to gradually deprecate |
Closing this one in favor of #2041 which is a better solution. |
This commit avoids doing 2 extra queries for every request (#1971)
even when solidus store is not using solidus_multi_domain extension.
This logic has now been moved to the solidus_multi_domain extension
since it is needed only when multiple stores are expected
(solidusio-contrib/solidus_multi_domain#67).
NOTE: there's something I'm not too happy about this PR. I'm moving out to solidus_multi_domain extension a spec about filtering api orders by store. But the code that filters api orders at the moment is still in core.
Since the new version of the "store selector class" always returns the default store, I'm not sure it makes sense to test that logic in core, even if the code is here. What about moving the controller code into the extension as it is done for shipments?