Sha256: 39616a1b358c5d320d6d5161f4dfa0c9fd6e9282f91251ae7d2d702febf438a2
Contents?: true
Size: 574 Bytes
Versions: 5
Compression:
Stored size: 574 Bytes
Contents
class CmsAdmin::SessionsController < CmsAdmin::BaseController skip_before_filter :cms_login_required def new @cms_user = CmsUser.new end def create @cms_current_user = CmsUser.authenticate(params[:login], params[:password]) if @cms_current_user session[:cms_user_id] = @cms_current_user.id redirect_to cms_admin_pages_path else flash[:error] = 'Incorrect Login or Password' render :action => :new end end def destroy session[:cms_user_id] = @cms_current_user = nil redirect_to :action => :new end end
Version data entries
5 entries across 5 versions & 1 rubygems