Commit 49d2edac authored by Markus Koller's avatar Markus Koller

Merge branch 'issue_341236' into 'master'

Update comment for ActiveModel::Serializers::JSON in presenter

See merge request gitlab-org/gitlab!75858
parents 9c4ecc0d 698c8e3b
......@@ -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?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment