-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
feature: remove all scope ( V2 ) #2323
Conversation
Code Climate has analyzed commit 1f4fa77 and detected 0 issues on this pull request. View more on Code Climate. |
lib/avo/loaders/loader.rb
Outdated
@@ -1,7 +1,7 @@ | |||
module Avo | |||
module Loaders | |||
class Loader | |||
attr_accessor :bag | |||
attr_accessor :bag, :remove_scope_all |
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.
Let's extract this to a separate ScopeLoader
class.
@@ -164,7 +164,8 @@ def scopes_list | |||
resource: resource, | |||
turbo_frame: turbo_frame, | |||
parent_record: parent_record, | |||
query: query | |||
query: query, | |||
remove_scope_all: resource.entity_loader(:scope).remove_scope_all |
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.
Can't we pass the loader and have the component ask the loader if it should show the default scope or not?
I feel that adding arbitrary options to it every time we change the API is not the way to go.
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 can and it's better for scalability
This PR has been merged into Please check the release guide for more information. |
Description
Fixes #2276
Check https://github.com/avo-hq/avo-advanced/pull/25 for details