Skip to content

Instantly share code, notes, and snippets.

@rbarazi
Created May 5, 2010 15:43
Show Gist options
  • Save rbarazi/390971 to your computer and use it in GitHub Desktop.
Save rbarazi/390971 to your computer and use it in GitHub Desktop.
[Beginning Rails 3] Listing 9-7. Updated Notifier Mailer in app/mailers/notifier.rb
class Notifier < ActionMailer::Base
default :from => "from@example.com"
def email_friend(article, sender_name, receiver_email)
@article = article
@sender_name = sender_name
mail :to => receiver_email, :subject => "Interesting Article"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment