Sha256: 8318b818c8ec0651a1bcf74669b5435f5183b48b9a6218f6d560196e7a605bef

Contents?: true

Size: 406 Bytes

Versions: 9

Compression:

Stored size: 406 Bytes

Contents

class SessionsController < ApplicationController
  def new
  end

  def create
    @user = User.find_by("LOWER(email)= ?", params[:email].downcase)
    if @user && @user.authenticate(params[:password])
      session[:user_id] = @user.id
      redirect_to params[:return_to] || root_url
    else
      flash[:warning] = "You have entered incorrect email and/or password."
      render :new
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mobile_workflow-0.7.7 lib/generators/mobile_workflow/install/templates/sessions_controller.rb.erb
mobile_workflow-0.7.6 lib/generators/mobile_workflow/install/templates/sessions_controller.rb.erb
mobile_workflow-0.7.5 lib/generators/mobile_workflow/install/templates/sessions_controller.rb.erb
mobile_workflow-0.7.4 lib/generators/mobile_workflow/install/templates/sessions_controller.rb.erb
mobile_workflow-0.7.3 lib/generators/mobile_workflow/install/templates/sessions_controller.rb.erb
mobile_workflow-0.7.2 lib/generators/mobile_workflow/install/templates/sessions_controller.rb.erb
mobile_workflow-0.7.1 lib/generators/mobile_workflow/install/templates/sessions_controller.rb.erb
mobile_workflow-0.7.0 lib/generators/mobile_workflow/install/templates/sessions_controller.rb.erb
mobile_workflow-0.6.31 lib/generators/mobile_workflow/install/templates/sessions_controller.rb.erb