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:
authorNatalia Tepluhina <ntepluhina@gitlab.com>2019-02-15 20:56:50 +0300
committerPhil Hughes <me@iamphill.com>2019-02-15 20:56:50 +0300
commitbf8f32da7ffc0c8490e1920152fd1dfd214747ba (patch)
treeba550b0c4cc67cd6d09211c14ed6f5c9befbb40f /app/serializers/diff_viewer_entity.rb
parent8f209ed5eac176fde0272ced69e36467e37fe79a (diff)
Replaced part of diff file properties with diff viewer
- replaced file.too_large - replaced file.text - replaced file.collapsed
Diffstat (limited to 'app/serializers/diff_viewer_entity.rb')
-rw-r--r--app/serializers/diff_viewer_entity.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/serializers/diff_viewer_entity.rb b/app/serializers/diff_viewer_entity.rb
index 587fa2347fd..45faca6cb2f 100644
--- a/app/serializers/diff_viewer_entity.rb
+++ b/app/serializers/diff_viewer_entity.rb
@@ -1,10 +1,8 @@
# frozen_string_literal: true
class DiffViewerEntity < Grape::Entity
- # Partial name refers directly to a Rails feature, let's avoid
- # using this on the frontend.
expose :partial_name, as: :name
- expose :error do |diff_viewer|
- diff_viewer.render_error_message
- end
+ expose :render_error, as: :error
+ expose :render_error_message, as: :error_message
+ expose :collapsed?, as: :collapsed
end