Class: CommentsMailer

Inherits:
ApplicationMailer show all
Defined in:
app/mailers/comments_mailer.rb

Instance Method Summary collapse

Instance Method Details

#created(comment, user) ⇒ Object

Subject can be set in your I18n file at config/locales/en.yml with the following lookup:

en.comments_mailer.created.subject

10
11
12
13
14
15
16
17
# File 'app/mailers/comments_mailer.rb', line 10

def created(comment, user)
  @comment = comment
  @user = user
  @author = comment.user
  @post_title = comment.commentable.title

  mail to: user.email, subject: "#{@author.name} ответил на Ваш комментарий"
end