Sha256: e18f7019103deee7bd0b17ee49bcf310ffd96ae30a208a2c194133656cfd6d85

Contents?: true

Size: 358 Bytes

Versions: 6

Compression:

Stored size: 358 Bytes

Contents

module DeviseTokenAuth
  class ApplicationController < DeviseController
    include DeviseTokenAuth::Concerns::SetUserByToken

    protected

    def resource_class(m=nil)
      if m
        mapping = Devise.mappings[m]
      else
        mapping = Devise.mappings[resource_name] || Devise.mappings.values.first
      end

      mapping.to
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
devise_token_auth-0.1.37.beta4 app/controllers/devise_token_auth/application_controller.rb
devise_token_auth-0.1.37.beta3 app/controllers/devise_token_auth/application_controller.rb
devise_token_auth-0.1.37.beta2 app/controllers/devise_token_auth/application_controller.rb
devise_token_auth-0.1.37.beta1 app/controllers/devise_token_auth/application_controller.rb
devise_token_auth-0.1.36 app/controllers/devise_token_auth/application_controller.rb
devise_token_auth-0.1.35 app/controllers/devise_token_auth/application_controller.rb