Skip to content

Commit

Permalink
Namespaced the confirmations controller
Browse files Browse the repository at this point in the history
  • Loading branch information
jferris committed Mar 26, 2009
1 parent 0c9d514 commit 589c703
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class ConfirmationsController < ApplicationController
class Clearance::ConfirmationsController < ApplicationController

before_filter :forbid_confirmed_user, :only => :new
before_filter :forbid_missing_token, :only => :new
Expand Down
4 changes: 3 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ActionController::Routing::Routes.draw do |map|
map.resources :passwords
map.resource :session
map.resources :users, :has_one => [:password, :confirmation]
map.resources :users, :has_one => [:password] do |users|
users.resource :confirmation, :controller => 'clearance/confirmations'
end
end
2 changes: 2 additions & 0 deletions test/controllers/confirmations_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

class ConfirmationsControllerTest < ActionController::TestCase

tests Clearance::ConfirmationsController

should_filter_params :token

context "a user whose email has not been confirmed" do
Expand Down

0 comments on commit 589c703

Please sign in to comment.