title: Rails + Devise: Custom login failure flash messages?
body: <p>I am trying to show a flash alert for when users fail to sign in. However, there will be two different cases:</p>
  
  <ol>
  <li><p>The email entered by the user exists, but the password is wrong. I want this message to show: <code>The email address or password you entered is incorrect.</code></p></li>
  <li><p>The email entered by the user doesn't exist. I want this message to show: <code>The email address and password you entered do not match our records. (You provided &lt;span class='black'&gt;#{params[:email]}&lt;/span&gt;)&lt;br/&gt;&lt;br/&gt;
      &lt;a href='/accounts/forgot_password' class='decorate'&gt;Having trouble accessing your account?&lt;/a&gt;</code></p></li>
  </ol>
  
  <p>Is there a hook similar to the <code>after_sign_in_path</code> where I can modify the flash based on these conditions?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>So I found this. But how do I pass in the email variable ONLY for <code>not_found_in_database</code>?</p>
  
  <pre><code>en:
    devise:
      failure:
        already_authenticated: "You are already signed in."
        invalid: "The email address or password you entered is incorrect."
        not_found_in_database: "The email address and password you entered do not match our records. (You provided &lt;span class='black'&gt;%{email}&lt;/span&gt;)&lt;br/&gt;&lt;br/&gt;&lt;a href='/accounts/forgot_password' class='decorate'&gt;Having trouble accessing your account?&lt;/a&gt;."
  </code></pre>