Class: SessionController

Inherits:
Object
  • Object
show all
Defined in:
lib/qaxpert/sample_login.rb

Instance Method Summary collapse

Instance Method Details

#createObject



2
3
4
5
6
7
8
9
10
11
12
13
# File 'lib/qaxpert/sample_login.rb', line 2

def create
  email = email[:email]
  password = password[:password]

  user = User.authenticate(email, password)

  if user
    redirect_to :home
  else
    redirect_to :login
  end
end