mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
10 lines
283 B
Ruby
10 lines
283 B
Ruby
|
|
class UserMailer < ApplicationMailer
|
||
|
|
default from: "notifications@example.com"
|
||
|
|
|
||
|
|
def notify_post_owner(comment:)
|
||
|
|
@comment = comment
|
||
|
|
@user = comment.post.user
|
||
|
|
|
||
|
|
mail(to: @user.email, subject: "[#{ENV.fetch('APP_NAME')}] - New comment on #{comment.post.title}")
|
||
|
|
end
|
||
|
|
end
|