Commit 9541bad2 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Check `service.discussion_to_resolve_id` to decide content of flash

That way the check is the same in the service & the controller
parent 4224124d
...@@ -110,7 +110,7 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -110,7 +110,7 @@ class Projects::IssuesController < Projects::ApplicationController
@issue = service.execute @issue = service.execute
if service.discussions_to_resolve.count(&:resolved?) > 0 if service.discussions_to_resolve.count(&:resolved?) > 0
flash[:notice] = if params[:discussion_to_resolve].present? flash[:notice] = if service.discussion_to_resolve_id
"Resolved 1 discussion." "Resolved 1 discussion."
else else
"Resolved all discussions." "Resolved all discussions."
......
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