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-12-13 07:42:33 +00:00
|
|
|
def access_request_email(request)
|
2016-10-17 00:22:00 +00:00
|
|
|
@request = request
|
2016-12-13 07:42:33 +00:00
|
|
|
@map = request.map
|
|
|
|
mail(to: @map.user.email, subject: request.requested_text)
|
|
|
|
end
|
|
|
|
|
|
|
|
def access_approved_email(request)
|
|
|
|
@request = request
|
|
|
|
@map = request.map
|
|
|
|
mail(to: request.user, subject: request.approved_text)
|
2016-10-17 00:22:00 +00:00
|
|
|
end
|
|
|
|
|
2016-04-24 15:50:35 +00:00
|
|
|
def invite_to_edit_email(map, inviter, invitee)
|
|
|
|
@inviter = inviter
|
|
|
|
@map = map
|
2016-12-13 07:42:33 +00:00
|
|
|
mail(to: invitee.email, subject: map.invited_text)
|
2016-04-24 15:50:35 +00:00
|
|
|
end
|
|
|
|
end
|