2016-09-24 03:00:46 +00:00
|
|
|
# frozen_string_literal: true
|
2016-04-24 15:50:35 +00:00
|
|
|
class MapMailer < ApplicationMailer
|
2016-07-26 00:14:23 +00:00
|
|
|
default from: 'team@metamaps.cc'
|
2016-04-24 15:50:35 +00:00
|
|
|
|
2016-10-17 00:22:00 +00:00
|
|
|
def access_request_email(request, map)
|
|
|
|
@request = request
|
|
|
|
@map = map
|
|
|
|
subject = @map.name + ' - request to edit'
|
|
|
|
mail(to: @map.user.email, subject: subject)
|
|
|
|
end
|
|
|
|
|
2016-04-24 15:50:35 +00:00
|
|
|
def invite_to_edit_email(map, inviter, invitee)
|
|
|
|
@inviter = inviter
|
|
|
|
@map = map
|
2016-10-17 00:22:00 +00:00
|
|
|
subject = @map.name + ' - invitation to edit'
|
2016-04-24 15:50:35 +00:00
|
|
|
mail(to: invitee.email, subject: subject)
|
|
|
|
end
|
|
|
|
end
|