From 0db79443eeaca358f74793f0dafe52f52c5b4497 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 21 Apr 2015 17:41:18 +0200 Subject: [PATCH] Satisfy Rubocop. --- app/models/concerns/participable.rb | 23 ++++++++++++----------- 1 file 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