title: Is user just confirmed in Rails Devise
body: <p>Using device the user just confirms his email and is directed to the sign in page. </p>
  
  <p>"Your account was successfully confirmed. Sign in to continue."</p>
  
  <p>is displayed. </p>
  
  <p>How could I check if the user was just confirmed and show an render an additional partial only for just confirmed users?</p>
  
  <p>Edit: Just to make clear - I am searching for ways to do the check in the view itself and the view is devise/sessions/new.html.erb.
  So I image something like:</p>
  
  <pre><code>&lt;% if user was just confirmed %&gt;
   &lt;%= render "the_special_partial" %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Currently I can implement this as</p>
  
  <pre><code>&lt;% if flash[:notice] &amp;&amp; flash[:notice].index("Your account was successfully confirmed. Sign in to continue.") %&gt;
      &lt;%= render :partial=&gt;"special_partial" %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>But we all know how ugly this is.</p>
  
  <p>The "Already answered questions" redirects the user to a new page. I would like to do the check in the same page.</p>