Skip to content

Commit

Permalink
use :only option for clearance routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Croak committed Mar 26, 2009
1 parent dc3cc1c commit abbadb1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.textile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
h1. Clearance

Rails authentication with email and password.
Rails authentication with email & password.

"We have clearance, Clarence.":http://www.youtube.com/v/mNRXJEE3Nz8

Expand Down
19 changes: 15 additions & 4 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
ActionController::Routing::Routes.draw do |map|
map.resources :passwords, :controller => 'clearance/passwords'
map.resource :session, :controller => 'clearance/sessions'
map.resources :passwords,
:controller => 'clearance/passwords',
:only => [:new, :create]

map.resource :session,
:controller => 'clearance/sessions',
:only => [:new, :create, :destroy]

map.resources :users, :controller => 'clearance/users' do |users|
users.resource :password, :controller => 'clearance/passwords'
users.resource :confirmation, :controller => 'clearance/confirmations'
users.resource :password,
:controller => 'clearance/passwords',
:only => [:create, :edit, :update]

users.resource :confirmation,
:controller => 'clearance/confirmations',
:only => [:new, :create]
end
end

0 comments on commit abbadb1

Please sign in to comment.