app/mailers/commontator/subscriptions_mailer.rb~ in commontator-0.5.14 vs app/mailers/commontator/subscriptions_mailer.rb~ in commontator-1.0.0
- old
+ new
@@ -1,8 +1,9 @@
module Commontator
class SubscriptionsMailer < ActionMailer::Base
include SharedHelper
+ include ThreadsHelper
def comment_created_email(comment, commontable_url)
setup_variables(comment, commontable_url)
mail(:bcc => @bcc, :subject => @subject) \
@@ -15,10 +16,11 @@
@comment = comment
@thread = @comment.thread
@creator = @comment.creator
- @bcc = @thread.subscribers.reject{|s| s == @creator}\
+ @bcc = @thread.subscribers.reject{|s| s == @creator || \
+ !s.commontator_config.subscription_emails} \
.collect{|s| commontator_email(s)}
return if @bcc.empty?
@commontable = @thread.commontable