This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SessionsController < ApplicationController | |
skip_before_filter :login_required | |
def create | |
user = User.authenticate(params[:username], params[:password]) | |
if user | |
session[:user_id] = user.id | |
flash[:notice] = "Logged in successfully." | |
redirect_to_target_or_default(twikets_path) | |
else | |
flash.now[:error] = "Invalid username or password!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rails 3.0.0.beta3 | |
# steak (0.4.0.a3) | |
# rspec (2.0.0.beta.8) | |
# capybara (0.3.7) | |
# | |
# The following spec finished without error with :rack_test as driver | |
# With :selenium as driver the | |
# scenario 'User enter correct login details' => failed | |
# |