1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Allow parent controller to be customizable.

This commit is contained in:
José Valim 2012-01-02 20:39:22 +01:00
parent a29a30effc
commit c3f864f2b6
3 changed files with 10 additions and 1 deletions

View file

@ -8,6 +8,10 @@ Notes: https://@plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.0
* Allow alternate ORMs to run compatibility setup code before Authenticatable is included (by @jm81)
* Do not run validations unless on reconfirmable branch
* enhancements
* allow parent controller to be customizable
* inherit from the same Devise parent controller (by @sj26)
== 2.0.0.rc
* enhancements

View file

@ -1,4 +1,4 @@
# All Devise controllers are inherited from here.
class DeviseController < ApplicationController
class DeviseController < Devise.parent_controller.constantize
include Devise::Controllers::InternalHelpers
end

View file

@ -214,6 +214,11 @@ module Devise
mattr_accessor :sign_out_via
@@sign_out_via = :get
# The parent controller all Devise controllers inherits from.
# Defaults to ApplicationController.
mattr_accessor :parent_controller
@@parent_controller = "ApplicationController"
# DEPRECATED CONFIG
# If true, uses salt as remember token and does not create it in the database.