-
Notifications
You must be signed in to change notification settings - Fork 897
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
Do not pass the same argument twice #14158
Conversation
Checked commit moolitayer@6b25bec with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
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.
a) Is the purpose of this to fix the check_policy_prevent
arguments?
b) Or to not put an active record object onto the queue?
If it is a, then will there be another PR for the b part?
cb = { | ||
:class_name => self.class.to_s, | ||
:instance_id => id, | ||
:method_name => :check_policy_prevent_callback, | ||
:args => [*cb_method], | ||
:args => [cb_method, event_target], |
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.
@moolitayer I'm assuming that event_target
is an object (which is good)
But this is also putting the object into the queue. (which is bad)
Please change the :args
to have the class and id.
And please change check_policy_prevent_callback
to take arguments with a class and id.
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, this is being fixed in another pr
The purpose is to fix a) ( |
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 for pulling out this smaller fix
cb = { | ||
:class_name => self.class.to_s, | ||
:instance_id => id, | ||
:method_name => :check_policy_prevent_callback, | ||
:args => [*cb_method], | ||
:args => [cb_method, event_target], |
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, this is being fixed in another pr
Thanks for taking the time to review @kbrock |
Simplify function call