Users can now login form the site homepage (previously the front login page
author<jlsharps@mit.edu> <>
Fri, 31 Aug 2007 01:28:15 +0000 (21:28 -0400)
committer<jlsharps@mit.edu> <>
Fri, 31 Aug 2007 01:28:15 +0000 (21:28 -0400)
wasn't working).

app/controllers/account_controller.rb
app/views/site/_basic_login.rhtml
app/views/site/index.rhtml

index 524d743ee0161551cbb97909f26f179e3c93e134..c9388f6f52c542fc7e6081556ccdb5ae661282a8 100644 (file)
@@ -14,6 +14,7 @@ class AccountController < ApplicationController
   #these methods provide basic functionality for the user login system
   #===================================================================
   def login
+    
     return unless request.post?
     self.current_user = User.authenticate(params[:login], params[:password])
     if logged_in?
index 9c689fcb55f084236dedd595a2c7f95065a11fe5..12a63dd9110b89c7c442310ea62c38ab884481b0 100644 (file)
@@ -1,11 +1,11 @@
 <% form_tag :controller => 'account', :action => 'login'  do %>
 
   <p><label for="login">Login</label></p>
-  <p><%= text_field "Login", "login", :size => 30 %></p>
+  <p><%= text_field_tag 'login' %></p>
   <p><label for="password">Password</label></p>
-  <p><%= password_field "Password", "password", :size => 30 %></p>
+  <p><%= password_field_tag 'password' %></p>
 
-  <p><%= submit_tag 'Login' %></p>
+  <p><%= submit_tag 'Log in' %></p>
 <% end %>
 
 <p><%= link_to 'Register for an account', :controller => 'account', :action => 'signup' %></p>
index f92fb98b10165434b8a832736e91ecf3f1cadeaa..9e2f7b51a3ab78a0213e0650ff457614da656706 100644 (file)
@@ -28,8 +28,8 @@
     
     <p>You must have an account to start a new vote or to administer an
     existing vote. You can log in or create a new account below.</p>
-
-    <%= render_partial 'basic_login' %>
+    
+    <%= render :partial => 'basic_login' %>
   <% end %>
 
   </div>

Benjamin Mako Hill || Want to submit a patch?