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