diff options
author | Natalia Tepluhina <ntepluhina@gitlab.com> | 2019-02-15 17:56:50 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-02-15 17:56:50 +0000 |
commit | bf8f32da7ffc0c8490e1920152fd1dfd214747ba (patch) | |
tree | ba550b0c4cc67cd6d09211c14ed6f5c9befbb40f /app/serializers/diff_viewer_entity.rb | |
parent | 8f209ed5eac176fde0272ced69e36467e37fe79a (diff) | |
download | gitlab-ce-bf8f32da7ffc0c8490e1920152fd1dfd214747ba.tar.gz |
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.rb | 8 |
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 |