title: Best way to send an email upon creation of a new model instance in Rails?
body: <p>I have an app with the following models: <code>User</code>, <code>Task</code>, and <code>Assignment</code>. Each Assignment <code>belongs_to</code> a User and a Task (or in other words, a Task is assigned to a User via an Assignment).</p>
  
  <p>Once a User completes a Task, the Assignment is marked as complete, and the app immediately creates a new Assignment (or in other words, assigns the task to someone else).</p>
  
  <p>Immediately after creating this new Assignment, I want to send an email to the new assignee. I know I can do this one of three ways:</p>
  
  <ol>
  <li>Explicitly send the email in my controller.</li>
  <li>Send the email in a callback on the Assignment model.</li>
  <li>Create an observer on the Assignment model and send the email in <code>after_create</code>.</li>
  </ol>
  
  <p>Which of these options do people think is best, and why? #1 seems bad to me, because I don't want to have to remember to send it in every action that might complete an Assignment. I've heard a couple people say that Rails observers are bad and should be avoided, but I'm not sure if they're people I should trust or not. Any other opinions?</p>