Class: ActionDispatch::Routing::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/devise/jwt/extensions/action_dispatch.rb

Instance Method Summary collapse

Instance Method Details

#devise_jwt_for(*resources) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/devise/jwt/extensions/action_dispatch.rb', line 4

def devise_jwt_for(*resources)
  options = resources.extract_options!
  options[:controllers] = default_devise_jwt_controllers.merge(options[:controllers] || {})
  options[:defaults] = { format: :json }.merge(options[:defaults] || {})
  Devise::JWT::WardenHelper.add_mappings(*resources)
  devise_for(*resources, options)
end