Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-07-27 20:34:04 +0300
committerPhil Hughes <me@iamphill.com>2016-07-27 20:34:04 +0300
commit2247d8a4fd7f77e1a4b8a50becdd08643435f19d (patch)
tree7a3e9c5769894b1e04cb66a95f7192ebd1d80e4c /app/controllers/projects/discussions_controller.rb
parent86446846e963ea1304b56fa74b4ca795a491bbb5 (diff)
Updates the text above discussions when resolving notes & discussions
Diffstat (limited to 'app/controllers/projects/discussions_controller.rb')
-rw-r--r--app/controllers/projects/discussions_controller.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/projects/discussions_controller.rb b/app/controllers/projects/discussions_controller.rb
index 8a79cac60c1..47f301a08d9 100644
--- a/app/controllers/projects/discussions_controller.rb
+++ b/app/controllers/projects/discussions_controller.rb
@@ -10,7 +10,8 @@ class Projects::DiscussionsController < Projects::ApplicationController
discussion.resolve!(current_user)
render json: {
- resolved_by: discussion.resolved_by.try(:name)
+ resolved_by: discussion.resolved_by.try(:name),
+ updated_html: view_to_html_string('discussions/_headline', discussion: discussion)
}
end
@@ -19,7 +20,9 @@ class Projects::DiscussionsController < Projects::ApplicationController
discussion.unresolve!
- head :ok
+ render json: {
+ updated_html: view_to_html_string('discussions/_headline', discussion: discussion)
+ }
end
private