diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 09:45:46 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 09:45:46 +0000 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /app/presenters/projects/import_export/project_export_presenter.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) | |
download | gitlab-ce-a7b3560714b4d9cc4ab32dffcd1f74a284b93580.tar.gz |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'app/presenters/projects/import_export/project_export_presenter.rb')
-rw-r--r-- | app/presenters/projects/import_export/project_export_presenter.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/presenters/projects/import_export/project_export_presenter.rb b/app/presenters/projects/import_export/project_export_presenter.rb index 7b2ffb6d755..53c547cde9e 100644 --- a/app/presenters/projects/import_export/project_export_presenter.rb +++ b/app/presenters/projects/import_export/project_export_presenter.rb @@ -3,11 +3,14 @@ module Projects module ImportExport class ProjectExportPresenter < Gitlab::View::Presenter::Delegated + # NOTE: This is needed because this presenter is serialized to JSON, + # and we need to make sure that `#as_json` is called in this class so + # it will use the overriden attributes below. Otherwise the call is + # delegated to the model and will use the original methods. include ActiveModel::Serializers::JSON presents ::Project, as: :project - # TODO: Remove `ActiveModel::Serializers::JSON` inclusion as it's duplicate delegator_override_with ActiveModel::Serializers::JSON delegator_override_with ActiveModel::Naming delegator_override :include_root_in_json, :include_root_in_json? |