summaryrefslogtreecommitdiff
path: root/app/models/concerns/presentable.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/concerns/presentable.rb')
-rw-r--r--app/models/concerns/presentable.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/concerns/presentable.rb b/app/models/concerns/presentable.rb
index 7b33b837004..bc4fbd19a02 100644
--- a/app/models/concerns/presentable.rb
+++ b/app/models/concerns/presentable.rb
@@ -1,4 +1,12 @@
module Presentable
+ extend ActiveSupport::Concern
+
+ class_methods do
+ def present(attributes)
+ all.map { |klass_object| klass_object.present(attributes) }
+ end
+ end
+
def present(**attributes)
Gitlab::View::Presenter::Factory
.new(self, attributes)