little fixes
This commit is contained in:
parent
dde097ea75
commit
915defcd1b
3 changed files with 4 additions and 3 deletions
|
@ -17,6 +17,6 @@ class MapMailer < ApplicationMailer
|
|||
def invite_to_edit(user_map)
|
||||
@inviter = user_map.map.user
|
||||
@map = user_map.map
|
||||
mail(to: user_map.user.email, subject: map.invited_text)
|
||||
mail(to: user_map.user.email, subject: @map.invited_text)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -46,7 +46,7 @@ class NotificationService
|
|||
template = get_template_for_event_type(event_type)
|
||||
mailboxer_code = get_mailboxer_code_for_event_type(event_type)
|
||||
body = renderer.render(template: template, locals: { map: user_map.map, inviter: user_map.map.user }, layout: false)
|
||||
user_map.user.notify(map.invited_text, body, user_map, false, mailboxer_code, true, user_map.map.user)
|
||||
user_map.user.notify(user_map.map.invited_text, body, user_map, false, mailboxer_code, true, user_map.map.user)
|
||||
end
|
||||
|
||||
# note: this is a global function, probably called from the rails console with some html body
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
<h2 class="title">Notifications</h4>
|
||||
</header>
|
||||
<ul class="notifications">
|
||||
<% notifications = @notifications.to_a.delete_if{|n| n.notified_object.nil? || n.notified_object.map.nil? }%>
|
||||
<% blacklist = [MAILBOXER_CODE_ACCESS_REQUEST, MAILBOXER_CODE_ACCESS_APPROVED, MAILBOXER_CODE_INVITE_TO_EDIT] %>
|
||||
<% notifications = @notifications.to_a.delete_if{|n| blacklist.include?(n.notification_code) && (n.notified_object.nil? || n.notified_object.map.nil?) }%>
|
||||
<% notifications.each do |notification| %>
|
||||
<% receipt = @receipts.find_by(notification_id: notification.id) %>
|
||||
<li class="notification <%= receipt.is_read? ? 'read' : 'unread' %>" id="notification-<%= notification.id %>">
|
||||
|
|
Loading…
Reference in a new issue