Class: Proclaim::SubscriptionMailer
- Inherits:
-
ApplicationMailer
- Object
- ActionMailer::Base
- ApplicationMailer
- Proclaim::SubscriptionMailer
- Defined in:
- app/mailers/proclaim/subscription_mailer.rb
Instance Method Summary collapse
- #new_comment_notification_email ⇒ Object
- #new_post_notification_email ⇒ Object
- #welcome_email ⇒ Object
Instance Method Details
#new_comment_notification_email ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/mailers/proclaim/subscription_mailer.rb', line 15 def new_comment_notification_email @comment = Comment.find(params[:comment_id]) = Premailer.new(render_to_string, with_html_string: true, base_url: root_url) mail to: @subscription.email, subject: "New Comment On \"#{@comment.post.title}\"" do |format| format.html { .to_inline_css } format.text { .to_plain_text } end end |
#new_post_notification_email ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'app/mailers/proclaim/subscription_mailer.rb', line 27 def new_post_notification_email @post = Post.find(params[:post_id]) = Premailer.new(render_to_string, with_html_string: true, base_url: root_url) mail to: @subscription.email, subject: "New Post: #{@post.title}" do |format| format.html { .to_inline_css } format.text { .to_plain_text } end end |
#welcome_email ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'app/mailers/proclaim/subscription_mailer.rb', line 5 def welcome_email = Premailer.new(render_to_string, with_html_string: true, base_url: root_url) base_url = root_url.gsub(/\A.*:\/\//, '').gsub(/\A(.*?)\/*\z/, '\1') mail to: @subscription.email, subject: "Welcome to #{base_url}!" do |format| format.html { .to_inline_css } format.text { .to_plain_text } end end |