Sha256: 4a91370b3944b4bdee18e583402277e59254e90709f2a06b47bfe54c89ddc1cf

Contents?: true

Size: 477 Bytes

Versions: 1

Compression:

Stored size: 477 Bytes

Contents

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

    protected

    def params_for_resource(resource)
      devise_parameter_sanitizer.instance_values['permitted'][resource]
    end

    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

1 entries across 1 versions & 1 rubygems

Version Path
devise_token_auth-0.1.37 app/controllers/devise_token_auth/application_controller.rb