diff options
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? |