Commit 6f8ff08c authored by Douwe Maan's avatar Douwe Maan

Fix behavior for Enumerable-like ActiveRecord relations.

parent 88983257
...@@ -32,12 +32,10 @@ module Participable ...@@ -32,12 +32,10 @@ module Participable
case value case value
when User when User
[value] [value]
when Array when Enumerable, ActiveRecord::Relation
value.flat_map { |v| participants_for(v, current_user) } value.flat_map { |v| participants_for(v, current_user) }
when Participable when Participable
value.participants(current_user) value.participants(current_user)
when Mentionable
value.mentioned_users(current_user)
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment