summaryrefslogtreecommitdiff
path: root/app/services/issuable_base_service.rb
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2019-01-29 13:11:04 -0600
committerFatih Acet <acetfatih@gmail.com>2019-01-30 23:18:21 +0100
commite725ee0c30650ea5041afe6bc36e15a5ff2f8a07 (patch)
tree9a0019a281c17a25a87f294c0d879b9409d0d111 /app/services/issuable_base_service.rb
parent19dc2fb082ebeb8c1874f59282eead8a8e05fb35 (diff)
downloadgitlab-ce-e725ee0c30650ea5041afe6bc36e15a5ff2f8a07.tar.gz
Changes for review comments
Diffstat (limited to 'app/services/issuable_base_service.rb')
-rw-r--r--app/services/issuable_base_service.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/app/services/issuable_base_service.rb b/app/services/issuable_base_service.rb
index 2835d598311..93dd6893e42 100644
--- a/app/services/issuable_base_service.rb
+++ b/app/services/issuable_base_service.rb
@@ -266,18 +266,18 @@ class IssuableBaseService < BaseService
update_task_params = params.delete(:update_task)
return unless update_task_params
- toggler = TaskListToggleService.new(issuable.description, issuable.description_html,
- line_source: update_task_params[:line_source],
- line_number: update_task_params[:line_number],
- currently_checked: !update_task_params[:checked],
- index: update_task_params[:index],
- sourcepos: !issuable.legacy_markdown?)
-
- if toggler.execute
+ tasklist_toggler = TaskListToggleService.new(issuable.description, issuable.description_html,
+ line_source: update_task_params[:line_source],
+ line_number: update_task_params[:line_number],
+ toggle_as_checked: update_task_params[:checked],
+ index: update_task_params[:index],
+ sourcepos: !issuable.legacy_markdown?)
+
+ if tasklist_toggler.execute
# by updating the description_html field at the same time,
# the markdown cache won't be considered invalid
- params[:description] = toggler.updated_markdown
- params[:description_html] = toggler.updated_markdown_html
+ params[:description] = tasklist_toggler.updated_markdown
+ params[:description_html] = tasklist_toggler.updated_markdown_html
# since we're updating a very specific line, we don't care whether
# the `lock_version` sent from the FE is the same or not. Just