我有带有布局的 project_mailer,但如果 project_notification 方法具有参数 that ,我想使用不同的方法unsubscribe_link = true
。
layout "project_mail"
def project_notification(user, projects, unsubsribe_link = false)
attachments.inline['logo_252.png'] = File.read(Rails.root + 'public/images/logo_252.png')
@user = user
@projects = projects
mail(:to => user.email, :subject => "New Projects")
end