Permalink
Browse files

use :only option for clearance routes

  • Loading branch information...
croaky committed Mar 26, 2009
1 parent dc3cc1c commit abbadb1551a7e479dd3eb60add3cf110bf21aeb0
Showing with 16 additions and 5 deletions.
  1. +1 −1 README.textile
  2. +15 −4 config/routes.rb
View
@@ -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
View
@@ -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.