Sha256: b1b89115485fdbe7251f264226f481d546af2f5ee554222ae98cae65de97d95e
Contents?: true
Size: 541 Bytes
Versions: 37
Compression:
Stored size: 541 Bytes
Contents
module Brightcontent class SessionsController < ApplicationController skip_before_filter :authorize def new end def create user = AdminUser.find_by_email(params[:email]) if user && user.authenticate(params[:password]) session[:brightcontent_user_id] = user.id redirect_to root_url else flash.now.alert = "Email or password is invalid" render :new end end def destroy session[:brightcontent_user_id] = nil redirect_to root_url end end end
Version data entries
37 entries across 37 versions & 2 rubygems