4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'app/mailers/user_joined_mailer.rb', line 4
def user_joined(to, object, joiner)
@joiner = joiner
@object = object
@object_type = object.class.name.casecmp('workgroup').zero? ? 'group' : object.class.name.downcase
@to = to
metadata['user-id-to'] = to.id
metadata['object-type'] = @object_type
mail(
to: "<#{to.email}>",
from: "JOGL - Just One Giant Lab <notifications@#{Rails.configuration.email}>",
subject: "A user joined your #{@object_type}",
tag: 'user-joined'
)
end
|