Class: ActionController::Routing::RouteSet

Inherits:
Object
  • Object
show all
Defined in:
lib/devise/rails/routes.rb

Overview

:nodoc:

Defined Under Namespace

Classes: Mapper

Instance Method Summary collapse

Instance Method Details

#load_routes_with_devise!Object

Ensure Devise modules are included only after loading routes, because we need devise_for mappings already declared to create magic filters and helpers.



7
8
9
10
11
12
13
14
15
# File 'lib/devise/rails/routes.rb', line 7

def load_routes_with_devise!
  load_routes_without_devise!
  return if Devise.mappings.empty?

  ActionController::Base.send :include, Devise::Controllers::Helpers
  ActionController::Base.send :include, Devise::Controllers::UrlHelpers

  ActionView::Base.send :include, Devise::Controllers::UrlHelpers
end