Skip to content

Instantly share code, notes, and snippets.

@volkanunsal
Created August 2, 2010 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save volkanunsal/504365 to your computer and use it in GitHub Desktop.
Save volkanunsal/504365 to your computer and use it in GitHub Desktop.
if user = User.authenticate(params[:user]["email"], params[:user]["password"])
#set_current_account(user)
session[:email]="mycookie@email.com"
redirect "/user"
else
flash[:error]= 'There was a problem signing you in. Please try again.'
render "sessions/login", :layout => !request.xhr?
end
=session[:email]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment