Permalink
Browse files

Merge pull request #1188 from sj26/controller-inheritence

Make all controllers inherit from a single DeviseController
  • Loading branch information...
josevalim committed Jan 2, 2012
2 parents a1464db + 2b64c6d commit 1fdeadd1139afb3292c81898956c65b865ebb165
@@ -1,4 +1,4 @@
-class Devise::ConfirmationsController < ApplicationController
+class Devise::ConfirmationsController < DeviseController
include Devise::Controllers::InternalHelpers
# GET /resource/confirmation/new
@@ -1,4 +1,4 @@
-class Devise::OmniauthCallbacksController < ApplicationController
+class Devise::OmniauthCallbacksController < DeviseController
include Devise::Controllers::InternalHelpers
def failure
@@ -1,4 +1,4 @@
-class Devise::PasswordsController < ApplicationController
+class Devise::PasswordsController < DeviseController
prepend_before_filter :require_no_authentication
include Devise::Controllers::InternalHelpers
@@ -1,4 +1,4 @@
-class Devise::RegistrationsController < ApplicationController
+class Devise::RegistrationsController < DeviseController
prepend_before_filter :require_no_authentication, :only => [ :new, :create, :cancel ]
prepend_before_filter :authenticate_scope!, :only => [:edit, :update, :destroy]
include Devise::Controllers::InternalHelpers
@@ -1,4 +1,4 @@
-class Devise::SessionsController < ApplicationController
+class Devise::SessionsController < DeviseController
prepend_before_filter :require_no_authentication, :only => [ :new, :create ]
prepend_before_filter :allow_params_authentication!, :only => :create
include Devise::Controllers::InternalHelpers
@@ -1,4 +1,4 @@
-class Devise::UnlocksController < ApplicationController
+class Devise::UnlocksController < DeviseController
prepend_before_filter :require_no_authentication
include Devise::Controllers::InternalHelpers
@@ -0,0 +1,3 @@
+# All Devise controllers are inherited from here.
+class DeviseController < ApplicationController
+end

0 comments on commit 1fdeadd

Please sign in to comment.