bunch of stuffs

This commit is contained in:
jomo
2013-07-28 02:47:10 +02:00
parent c00532aff2
commit 2699751d86
19 changed files with 299 additions and 54 deletions

View File

@@ -7,7 +7,7 @@ class SessionsController < ApplicationController
user.save
if user.banned
flash[:alert] = "You are banned!"
redirect_to login_path
redirect_to user
else
session[:user_id] = user.id
redirect_to root_path, :notice => "Logged in!"
@@ -19,7 +19,7 @@ class SessionsController < ApplicationController
end
def destroy
session[:user_id] = nil
session.delete(:user_id)
redirect_to login_path, :notice => "Logged out!"
end
end