A global login form that works from ANY page

Here's how I do it:

In my views directory I created a directory called shared, where I put any partials that are used in more than one place. In there I have a partial named _quick_login_form.rhtml that creates the form fields. Then in my layout I have this:

<div class = "quick-login"> <% form_tag :action => 'login', :controller => :login do %>     <%= render :partial => '/shared/quick_login_form' %>     <%= submit_tag "Member Login" %><br>   <span id="very-small-link"><%= link_to "Forgot your Login?", :action => :forgotten_login, :controller => :login %></span> <% end %> </div>

You could put the whole form in the partial, of course.