Forum: Ruby on Rails disable action mailer only to blog posts in site

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B5ce46f0ffc7fd83fc3b156938b21327?d=identicon&s=25 Sailatha K. (sailatha_k)
on 2015-02-06 12:45
how to write a code to stop mail sending when a new blog post is created
to the users.

app/mailers/blog mailer :

class BlogMailer < ActionMailer::Base

  default from: " Impact Institute (alert)
<no-reply@impactinstitute.org>"

  def new_post_alert(follower, post)
    @follower, @post = follower, post
    mail(:to => "#{follower.name} <#{follower.email}>", :subject => "New
Blog entry at impactinstitute.org: #{post.title}")
  end
end

i have reasearch mailer file and also resource mailer.i only want above
functionality to stop mails to the users when new post is created plz
help.
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2015-02-06 14:11
(Received via mailing list)
On Friday, February 6, 2015 at 11:45:44 AM UTC, Ruby-Forum.com User
wrote:
>
> how to write a code to stop mail sending when a new blog post is created
> to the users.
>
> app/mailers/blog mailer :
>
>
Somewhere in your app will be something calling this mailer - remove it.

Fred
B5ce46f0ffc7fd83fc3b156938b21327?d=identicon&s=25 Sailatha K. (sailatha_k)
on 2015-02-09 08:13
Frederick Cheung wrote in post #1167785:
> On Friday, February 6, 2015 at 11:45:44 AM UTC, Ruby-Forum.com User
> wrote:
>>
>> how to write a code to stop mail sending when a new blog post is created
>> to the users.
>>
>> app/mailers/blog mailer :
>>
>>
> Somewhere in your app will be something calling this mailer - remove it.
>
> Fred

config.action_mailer.perform_deliveries = true

if i make this false all other mailers also wont work.
is there any other way of integrating,any condition or any code to write
with
This topic is locked and can not be replied to.