Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SessionController < ApplicationController def login
- user = User.find_by_name_and_password(params[:user], params[:password]) if user
- session[:user_id] = user.id
- redirect_to :action => "index"
- else
- reset_session
- flash[:note] = "Invalid user name/password"
- end end
Add Comment
Please, Sign In to add comment