diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-06 00:04:42 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-04-06 00:04:42 +0300 |
commit | d54cf868f81ca957c8322661b11e6755d9ea5a85 (patch) | |
tree | 39ef104a65a13fc41a5fcc3a79b9e1ec9c154d3d /app/models | |
parent | dd271e246001a06609592eef109d154291305d32 (diff) |
Resolve "Show `failure_reason` and upgrade tooltips of jobs"
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/concerns/presentable.rb | 8 |
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) |