diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2019-01-24 16:51:14 +0000 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2019-01-24 16:51:14 +0000 |
commit | 5265942b751f41022393df2f52bc8e005d1ca168 (patch) | |
tree | 724aa6b7995a81cbbf189bae11a5f95f8af7f60e /lib/api/helpers/presentable.rb | |
parent | 426716d1556f821988e67cc178e4ecffc4115897 (diff) | |
download | gitlab-ce-11-4-stable.tar.gz |
Revert "Merge branch 'security-pipeline-trigger-tokens-exposure-11-4' into 'security-11-4'"11-4-stable
This reverts commit 426716d1556f821988e67cc178e4ecffc4115897
Diffstat (limited to 'lib/api/helpers/presentable.rb')
-rw-r--r-- | lib/api/helpers/presentable.rb | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/api/helpers/presentable.rb b/lib/api/helpers/presentable.rb deleted file mode 100644 index 973c2132efe..00000000000 --- a/lib/api/helpers/presentable.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -module API - module Helpers - ## - # This module makes it possible to use `app/presenters` with - # Grape Entities. It instantiates model presenter and passes - # options defined in the API endpoint to the presenter itself. - # - # present object, with: Entities::Something, - # current_user: current_user, - # another_option: 'my options' - # - # Example above will make `current_user` and `another_option` - # values available in the subclass of `Gitlab::View::Presenter` - # thorough a separate method in the presenter. - # - # The model class needs to have `::Presentable` module mixed in - # if you want to use `API::Helpers::Presentable`. - # - module Presentable - extend ActiveSupport::Concern - - def initialize(object, options = {}) - super(object.present(options), options) - end - end - end -end |