metamaps--metamaps/app/mailers/map_mailer.rb

23 lines
556 B
Ruby
Raw Normal View History

2016-09-24 03:00:46 +00:00
# frozen_string_literal: true
class MapMailer < ApplicationMailer
default from: 'team@metamaps.cc'
2016-12-13 07:42:33 +00:00
def access_request_email(request)
@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)
end
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)
end
end