title: Email field filled in automatically when viewing user profile page in Rails app
body: <p>I have a Rails app that allows users to create an account (handled by Devise). I have a custom login form in the header of the website. The issue is that the email field in the form is automatically filled in with the email address of the User displayed in the show page.</p>
  
  <p>For example: Browsing the website, land on Jim's profile page when logged out. The email field in the login form will display Jim's email address.</p>
  
  <p>It's a very odd bug and this only happens when you view a specific User profile page. Here's the login form in the header:</p>
  
  <pre><code>&lt;%= form_for(:user, :url =&gt; session_path(:user)) do |f| %&gt;
        &lt;%= f.text_field :email, :style =&gt; "width:125px;", :placeholder =&gt; "email" %&gt;
        &lt;%= f.password_field :password, :style =&gt; "width:125px;", :placeholder =&gt; "password" %&gt;
        &lt;%= f.check_box :remember_me %&gt;&lt;%= f.label :remember_me, :class =&gt; "checkbox inline", :style =&gt; "color: white; font-size: 12px" %&gt;  
        &lt;%= f.submit 'Log in', :class =&gt; "btn btn-primary btn-small" %&gt;
        &lt;%= link_to "Forgot password?", new_password_path(:user), :style =&gt; "font-size: 12px; color: white" %&gt;
  </code></pre>
  
  <p>I created the above form using this guide:</p>
  
  <p><a href="https://github.com/plataformatec/devise/wiki/How-To:-Display-a-custom-sign_in-form-anywhere-in-your-app" rel="nofollow">https://github.com/plataformatec/devise/wiki/How-To:-Display-a-custom-sign_in-form-anywhere-in-your-app</a></p>
  
  <p>Any ideas on how to fix this? Thanks!</p>