Bummer! This is just a preview. You need to be signed in with a Pro account to view the entire video.
Where Mailers Fit0:38 with Jason Seifer
Mailers live in a special place in a Rails application. In this video, we'll learn where mailers are stored and how to call them.
In Ruby on Rails,
a mailer class lives in the app directory under a subdirectory called mailers.
This helps to keep the code organized and separate.
Each method in a mailer corresponds to a specific
email that's going to be sent out.
In ODOT, we're going to create a method in our notifier mailer called to do list.
This will be the method that assembles the to do list for emailing to someone else.
We can then send the email by saying the name of the mailer class,
which in this case is notifier, then a dot,
then to do list with any arguments, and then another dot, and the word deliver.
You need to sign up for Treehouse in order to download course files.Sign up