title: Devise Login Form on another page
body: <p>I wish to add a devise login form to my home page (model called home)</p>
  
  <p>I have found this but stuck where to put certain bits and work!</p>
  
  <p><a href="http://pupeno.com/2010/08/29/show-a-devise-log-in-form-in-another-page/" rel="nofollow">http://pupeno.com/2010/08/29/show-a-devise-log-in-form-in-another-page/</a></p>
  
  <pre><code>&lt;h2&gt;Sign in&lt;/h2&gt;
  
  &lt;% form_for resource_name, resource, :url =&gt; session_path(resource_name) do |f| -%&gt;
    &lt;p&gt;&lt;%= f.label :email %&gt;&lt;/p&gt;
    &lt;p&gt;&lt;%= f.text_field :email %&gt;&lt;/p&gt;
  
    &lt;p&gt;&lt;%= f.label :password %&gt;&lt;/p&gt;
    &lt;p&gt;&lt;%= f.password_field :password %&gt;&lt;/p&gt;
  
    &lt;% if devise_mapping.rememberable? -%&gt;
      &lt;p&gt;&lt;%= f.check_box :remember_me %&gt; &lt;%= f.label :remember_me %&gt;&lt;/p&gt;
    &lt;% end -%&gt;
  
    &lt;p&gt;&lt;%= f.submit "Sign in" %&gt;&lt;/p&gt;
  &lt;% end -%&gt;
  
  &lt;%= render :partial =&gt; "shared/devise_links" %&gt;
  </code></pre>
  
  <p>and (no idea where to put)</p>
  
  <pre><code>module ContentHelper
    def resource_name
      :user
    end
  
    def resource
      @resource ||= User.new
    end
  
    def devise_mapping
      @devise_mapping ||= Devise.mappings[:user]
    end
  end
  </code></pre>
  
  <p>My devise is set up as 'members' so any help would be great :) Cheers</p>