Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "Removing namespaces for controllers"

This reverts commit e2601db.
  • Loading branch information...
commit 0b7dadf1080addb2da10d2664c4eaedf5ccf35dd 1 parent e2f0798
@qrush qrush authored
View
2  ...controllers/clearance_confirmations_controller.rb → ...controllers/clearance/confirmations_controller.rb
@@ -1,4 +1,4 @@
-class ClearanceConfirmationsController < ApplicationController
+class Clearance::ConfirmationsController < ApplicationController
before_filter :forbid_confirmed_user, :only => :new
before_filter :forbid_missing_token, :only => :new
View
2  app/controllers/clearance_passwords_controller.rb → app/controllers/clearance/passwords_controller.rb
@@ -1,4 +1,4 @@
-class ClearancePasswordsController < ApplicationController
+class Clearance::PasswordsController < ApplicationController
before_filter :forbid_missing_token, :only => [:edit, :update]
before_filter :forbid_non_existent_user, :only => [:edit, :update]
View
2  app/controllers/clearance_sessions_controller.rb → app/controllers/clearance/sessions_controller.rb
@@ -1,4 +1,4 @@
-class ClearanceSessionsController < ApplicationController
+class Clearance::SessionsController < ApplicationController
protect_from_forgery :except => :create
filter_parameter_logging :password
View
2  app/controllers/clearance_users_controller.rb → app/controllers/clearance/users_controller.rb
@@ -1,4 +1,4 @@
-class ClearanceUsersController < ApplicationController
+class Clearance::UsersController < ApplicationController
before_filter :redirect_to_root, :only => [:new, :create], :if => :signed_in?
filter_parameter_logging :password
View
10 config/clearance_routes.rb
@@ -1,19 +1,19 @@
ActionController::Routing::Routes.draw do |map|
map.resources :passwords,
- :controller => 'clearance_passwords',
+ :controller => 'clearance/passwords',
:only => [:new, :create]
map.resource :session,
- :controller => 'clearance_sessions',
+ :controller => 'clearance/sessions',
:only => [:new, :create, :destroy]
- map.resources :users, :controller => 'clearance_users' do |users|
+ map.resources :users, :controller => 'clearance/users' do |users|
users.resource :password,
- :controller => 'clearance_passwords',
+ :controller => 'clearance/passwords',
:only => [:create, :edit, :update]
users.resource :confirmation,
- :controller => 'clearance_confirmations',
+ :controller => 'clearance/confirmations',
:only => [:new, :create]
end
end
View
4 ...ollers/clearance_confirmations_controller_test.rb → test/controllers/confirmations_controller_test.rb
@@ -1,6 +1,8 @@
require 'test_helper'
-class ClearanceConfirmationsControllerTest < ActionController::TestCase
+class ConfirmationsControllerTest < ActionController::TestCase
+
+ tests Clearance::ConfirmationsController
should_filter_params :token
View
6 ...ontrollers/clearance_passwords_controller_test.rb → test/controllers/passwords_controller_test.rb
@@ -1,9 +1,11 @@
require 'test_helper'
-class ClearancePasswordsControllerTest < ActionController::TestCase
+class PasswordsControllerTest < ActionController::TestCase
+
+ tests Clearance::PasswordsController
should_route :get, '/users/1/password/edit',
- :controller => 'clearance_passwords', :action => 'edit', :user_id => '1'
+ :controller => 'clearance/passwords', :action => 'edit', :user_id => '1'
context "a signed up user" do
setup do
View
4 ...controllers/clearance_sessions_controller_test.rb → test/controllers/sessions_controller_test.rb
@@ -1,6 +1,8 @@
require 'test_helper'
-class ClearanceSessionsControllerTest < ActionController::TestCase
+class SessionsControllerTest < ActionController::TestCase
+
+ tests Clearance::SessionsController
should_filter_params :password
View
4 test/controllers/clearance_users_controller_test.rb → test/controllers/users_controller_test.rb
@@ -1,6 +1,8 @@
require 'test_helper'
-class ClearanceUsersControllerTest < ActionController::TestCase
+class UsersControllerTest < ActionController::TestCase
+
+ tests Clearance::UsersController
should_filter_params :password
Please sign in to comment.
Something went wrong with that request. Please try again.