Commit bb89b9c6 authored by harsimarsandhu's avatar harsimarsandhu

Apply review suggestions

parent 1f1d3801
...@@ -6,7 +6,7 @@ module ApprovalRules ...@@ -6,7 +6,7 @@ module ApprovalRules
def initialize(approval_rule, current_user) def initialize(approval_rule, current_user)
@rule = approval_rule @rule = approval_rule
super(approval_rule, current_user) super(approval_rule.project, current_user)
end end
def execute def execute
...@@ -18,7 +18,7 @@ module ApprovalRules ...@@ -18,7 +18,7 @@ module ApprovalRules
end end
if rule.destroyed? if rule.destroyed?
audit_deletion(rule) audit_deletion
success success
else else
error(rule.errors.messages) error(rule.errors.messages)
...@@ -34,7 +34,7 @@ module ApprovalRules ...@@ -34,7 +34,7 @@ module ApprovalRules
.delete_all .delete_all
end end
def audit_deletion(rule) def audit_deletion
audit_context = { audit_context = {
author: current_user, author: current_user,
scope: rule.project, scope: rule.project,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment