Class: Coca::AuthenticationsController

Inherits:
RocketPants::Base
  • Object
show all
Includes:
Devise::Controllers::Helpers
Defined in:
app/controllers/coca/authentications_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



8
9
10
11
12
13
14
15
# File 'app/controllers/coca/authentications_controller.rb', line 8

def show
  scope = params[:scope].to_sym      
  if user = warden.authenticate(:scope => scope)
    expose user
  else
    head :unauthorized
  end
end