Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1188 from sj26/controller-inheritence

Make all controllers inherit from a single DeviseController
  • Loading branch information...
commit 1fdeadd1139afb3292c81898956c65b865ebb165 2 parents a1464db + 2b64c6d
@josevalim josevalim authored
View
2  app/controllers/devise/confirmations_controller.rb
@@ -1,4 +1,4 @@
-class Devise::ConfirmationsController < ApplicationController
+class Devise::ConfirmationsController < DeviseController
include Devise::Controllers::InternalHelpers
# GET /resource/confirmation/new
View
2  app/controllers/devise/omniauth_callbacks_controller.rb
@@ -1,4 +1,4 @@
-class Devise::OmniauthCallbacksController < ApplicationController
+class Devise::OmniauthCallbacksController < DeviseController
include Devise::Controllers::InternalHelpers
def failure
View
2  app/controllers/devise/passwords_controller.rb
@@ -1,4 +1,4 @@
-class Devise::PasswordsController < ApplicationController
+class Devise::PasswordsController < DeviseController
prepend_before_filter :require_no_authentication
include Devise::Controllers::InternalHelpers
View
2  app/controllers/devise/registrations_controller.rb
@@ -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
View
2  app/controllers/devise/sessions_controller.rb
@@ -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
View
2  app/controllers/devise/unlocks_controller.rb
@@ -1,4 +1,4 @@
-class Devise::UnlocksController < ApplicationController
+class Devise::UnlocksController < DeviseController
prepend_before_filter :require_no_authentication
include Devise::Controllers::InternalHelpers
View
3  app/controllers/devise_controller.rb
@@ -0,0 +1,3 @@
+# All Devise controllers are inherited from here.
+class DeviseController < ApplicationController
+end
Please sign in to comment.
Something went wrong with that request. Please try again.