Add Site settings > General (#133)

This commit is contained in:
Riccardo Graziosi
2022-07-18 10:47:54 +02:00
committed by GitHub
parent bdc4004e4a
commit 35831b9801
99 changed files with 2405 additions and 281 deletions

View File

@@ -1,4 +1,5 @@
class ApplicationMailer < ActionMailer::Base
default from: "notifications@example.com"
default from: "notifications@astuto.io"
layout 'mailer'
helper :application
end

View File

@@ -2,6 +2,8 @@ class UserMailer < ApplicationMailer
layout 'user_mailer'
def notify_post_owner(comment:)
@tenant = comment.tenant
Current.tenant = @tenant
@comment = comment
@user = comment.post.user
@@ -12,6 +14,8 @@ class UserMailer < ApplicationMailer
end
def notify_comment_owner(comment:)
@tenant = comment.tenant
Current.tenant = @tenant
@comment = comment
@user = comment.parent.user
@@ -22,6 +26,8 @@ class UserMailer < ApplicationMailer
end
def notify_followers_of_post_update(comment:)
@tenant = comment.tenant
Current.tenant = @tenant
@comment = comment
mail(
@@ -31,6 +37,8 @@ class UserMailer < ApplicationMailer
end
def notify_followers_of_post_status_change(post:)
@tenant = post.tenant
Current.tenant = @tenant
@post = post
mail(
@@ -42,6 +50,6 @@ class UserMailer < ApplicationMailer
private
def app_name
ENV.fetch('APP_NAME')
Current.tenant_or_raise!.site_name
end
end