Class: DeviseController

Inherits:
Object
  • Object
show all
Includes:
Devise::Controllers::ScopedViews
Defined in:
app/controllers/devise_controller.rb

Overview

All Devise controllers are inherited from here.

Instance Method Summary collapse

Instance Method Details

#_prefixesObject

Override prefixes to consider the scoped view. Notice we need to check for the request due to a bug in Action Controller tests that forces _prefixes to be loaded before even having a request object.

This method should be public as it is in ActionPack itself. Changing its visibility may break other gems.



27
28
29
30
31
32
33
# File 'app/controllers/devise_controller.rb', line 27

def _prefixes #:nodoc:
  @_prefixes ||= if self.class.scoped_views? && request && devise_mapping
    ["#{devise_mapping.scoped_path}/#{controller_name}"] + super
  else
    super
  end
end