Sha256: 2de4d4bbc023a00b5bf1c3572c6563eaf5cd9cb725f4d31066c99a8654cf8e28
Contents?: true
Size: 545 Bytes
Versions: 1
Compression:
Stored size: 545 Bytes
Contents
class Admin::SessionsController < Puffer::SessionsBase def new @record = PufferUser.new end def create @record = PufferUser.find_by_email(params[:puffer_user][:email]) if @record && @record.authenticate(params[:puffer_user][:password]) session[:puffer_user_id] = @record.id redirect_to admin_root_url else @record = PufferUser.new :email => params[:puffer_user][:email] render 'new' end end def destroy session.delete(:puffer_user_id) redirect_to new_admin_session_url end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
puffer-0.0.29 | app/controllers/admin/sessions_controller.rb |