summaryrefslogtreecommitdiff
path: root/app/serializers/diff_file_entity.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers/diff_file_entity.rb')
-rw-r--r--app/serializers/diff_file_entity.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/serializers/diff_file_entity.rb b/app/serializers/diff_file_entity.rb
index 45c16aabe9e..26a42d2e9eb 100644
--- a/app/serializers/diff_file_entity.rb
+++ b/app/serializers/diff_file_entity.rb
@@ -64,6 +64,10 @@ class DiffFileEntity < DiffFileBaseEntity
# Used for parallel diffs
expose :parallel_diff_lines, using: DiffLineParallelEntity, if: -> (diff_file, options) { parallel_diff_view?(options, diff_file) && diff_file.text? }
+ expose :code_navigation_path, if: -> (diff_file) { options[:code_navigation_path] } do |diff_file|
+ options[:code_navigation_path].full_json_path_for(diff_file.new_path)
+ end
+
private
def parallel_diff_view?(options, diff_file)