github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

binarylogic / authlogic_example

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 473
    • 66
  • Source
  • Commits
  • Network (66)
  • Issues (7)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Tree: 5819a13

click here to add a description

click here to add a homepage

  • Branches (3)
    • master
    • with-openid
    • with-password-resets
  • Tags (0)
Sending Request…
Click here to lend your support to: authlogic_example and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

An example rails app using the Authlogic authentication library — Read more

  cancel

http://authlogicexample.binarylogic.com

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Remove email field 
binarylogic (author)
Sun Mar 29 22:57:40 -0700 2009
commit  5819a13477797d758cb6871f475ed1c54bf8a3a7
tree    cf117443023906a7c0bce789606b64376a4e1cf2
parent  8848ed7999d92e642c9314c0f6c970cf76d5d306
authlogic_example / app / controllers / user_sessions_controller.rb app/controllers/user_sessions_controller.rb
100644 25 lines (21 sloc) 0.607 kb
edit raw blame history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class UserSessionsController < ApplicationController
  before_filter :require_no_user, :only => [:new, :create]
  before_filter :require_user, :only => :destroy
  
  def new
    @user_session = UserSession.new
  end
  
  def create
    @user_session = UserSession.new(params[:user_session])
    if @user_session.save
      flash[:notice] = "Login successful!"
      redirect_back_or_default account_url
    else
      render :action => :new
    end
  end
  
  def destroy
    current_user_session.destroy
    flash[:notice] = "Logout successful!"
    redirect_back_or_default new_user_session_url
  end
end
 
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server