-
Notifications
You must be signed in to change notification settings - Fork 83
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
transparent scope #67
Conversation
allow to chain scopes and scopes are transparent if no values are given to it. fix state-machines#66
Thank you. |
93f5134
to
fad6f6a
Compare
end | ||
|
||
# Generates the results for the given scope based on one or more states to filter by | ||
def run_scope(scope, machine, klass, states) |
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.
this is the same method as the one from state_machines https://github.com/state-machines/state_machines/blob/309668998449ca6c348de809f34660d822bc626e/lib/state_machines/machine.rb#L2130-L2135 but I just add compact
.
I don't know how to change related gems in this pull request so I just override this method. Can you help me to do that?
this is needed for the pull request that allow transparent scope state-machines/state_machines-activerecord#67
@seuros What do you think about this pull request? |
59737a5
to
ec6ea0e
Compare
end | ||
|
||
# Generates the results for the given scope based on one or more states to filter by | ||
def run_scope(scope, machine, klass, states) |
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 was this method added?
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.
sorry, I add it to override this method from state machine (see state-machines/state_machines#63).
I don't know how to change gem dependency to do that in a good way. Can you give me some information, so that I can to it?
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.
@diegotoral Are you up to rebase this PR ?
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.
I am not updated with the pull request but I can give it a try some day this week. 👍
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.
Any update ?
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.
I have the branch rebased but I'm not allowed to push it here. 😬
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 you open a new pre ?
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.
thanks to continuing my work 👍
allow to chain scopes and scopes are transparent if no values are given to it.
fix #66