Commit 698c8e3b authored by Siddharth Asthana's avatar Siddharth Asthana Committed by Markus Koller

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

Changelog: other
parent 105bd5f3
......@@ -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