diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-21 17:41:18 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-24 12:30:37 +0200 |
commit | 0db79443eeaca358f74793f0dafe52f52c5b4497 (patch) | |
tree | 6ae2ce391bfd314a82ecaa9ece0162ffa9737417 /app/models/concerns/participable.rb | |
parent | 2456695422f01c677cf287f0021d01a08dd60c30 (diff) | |
download | gitlab-ce-0db79443eeaca358f74793f0dafe52f52c5b4497.tar.gz |
Satisfy Rubocop.
Diffstat (limited to 'app/models/concerns/participable.rb')
-rw-r--r-- | app/models/concerns/participable.rb | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/app/models/concerns/participable.rb b/app/models/concerns/participable.rb index d78810f2eab..f59dbc471ac 100644 --- a/app/models/concerns/participable.rb +++ b/app/models/concerns/participable.rb @@ -27,16 +27,17 @@ module Participable end private - def participants_for(value, current_user = nil) - case value - when User - [value] - when Array - value.flat_map { |v| participants_for(v, current_user) } - when Participable - value.participants(current_user) - when Mentionable - value.mentioned_users(current_user) - end + + def participants_for(value, current_user = nil) + case value + when User + [value] + when Array + value.flat_map { |v| participants_for(v, current_user) } + when Participable + value.participants(current_user) + when Mentionable + value.mentioned_users(current_user) end + end end |