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

25 lines
609 B
Ruby
Raw Normal View History

2016-09-24 03:00:46 +00:00
# frozen_string_literal: true
2017-11-25 19:23:47 +00:00
class MapMailer < ApplicationMailer
include MapMailerHelper
default from: 'team@metamaps.cc'
def access_approved(request)
@request = request
2016-12-13 07:42:33 +00:00
@map = request.map
mail(to: request.user.email, subject: access_approved_subject(@map))
2016-12-13 07:42:33 +00:00
end
def access_request(request)
2016-12-13 07:42:33 +00:00
@request = request
@map = request.map
mail(to: @map.user.email, subject: access_request_subject(@map))
end
2017-02-09 21:53:19 +00:00
def invite_to_edit(user_map)
@inviter = user_map.map.user
@map = user_map.map
mail(to: user_map.user.email, subject: invite_to_edit_subject(@map))
end
end