In Rails how do I call a form from another model in any given layout? I have a login form I want to put in the header of every page. I created a partial with the following in it:
<% form_for(@user_session) do |f| %>
<p>
<%= f.label :username %><br />
<%= f.text_field :username, :class=>'' %>
</p>
<p>
<%= f.label :password %><br />
<%= f.password_field :password %>
</p>
<%= f.check_box :remember_me %><%= f.label :remember_me %><br />
<br />
<p>
<%= f.submit 'Login' %>
</p>
<% end %>
then tried calling that partial in my header and that doesn't seem to work.
<%= render :partial => 'user_sessions/login' %>
I get a "Called id for nil" error