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:
authorPatrick Bajao <ebajao@gitlab.com>2019-07-05 14:03:47 +0300
committerDouwe Maan <douwe@gitlab.com>2019-07-05 14:03:47 +0300
commit6ef6693e3767d480362ce528dd0beff159c895ff (patch)
treed2f55dee037e7258ce8eec829bca4bb77f34a745 /app/services/discussions
parenta1edc5a5cb3e740b0c215c54ce282535b143a9db (diff)
Refactor PositionTracer to support different types
This is to prepare for supporing image type position tracing
Diffstat (limited to 'app/services/discussions')
-rw-r--r--app/services/discussions/update_diff_position_service.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/services/discussions/update_diff_position_service.rb b/app/services/discussions/update_diff_position_service.rb
index c61437fb2e3..7bdf7711155 100644
--- a/app/services/discussions/update_diff_position_service.rb
+++ b/app/services/discussions/update_diff_position_service.rb
@@ -3,7 +3,8 @@
module Discussions
class UpdateDiffPositionService < BaseService
def execute(discussion)
- result = tracer.trace(discussion.position)
+ old_position = discussion.position
+ result = tracer.trace(old_position)
return unless result
position = result[:position]