Skip to content

Conversation

@penguin-10
Copy link

This PR fixes the commented example default value for config.parent_controller in
the Devise initializer template (config/initializers/devise.rb).

The previous example set config.parent_controller to DeviseController, which is
incorrect. The actual default parent controller is ApplicationController.

The default value is set here:

devise/lib/devise.rb

Lines 240 to 244 in cf93de3

# The parent controller all Devise controllers inherits from.
# Defaults to ApplicationController. This should be set early
# in the initialization process and should be set to a string.
mattr_accessor :parent_controller
@@parent_controller = "ApplicationController"

This setting is used in the code here:
https://github.com/heartcombo/devise/blob/cf93de390a29654620fdf7ac07b4794eb95171d0/app/controllers/devise_controller.rb#L4C1-L4C62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant