Sha256: 2a4ca0100df6e322ba45d8e72a6c8b34d9f286d2423b82f97079a5ecd2a3b250
Contents?: true
Size: 795 Bytes
Versions: 1
Compression:
Stored size: 795 Bytes
Contents
# encoding: utf-8 class SessionsController < ApplicationController def new @title= 'เข้าใช้ระบบ' end # to refresh the page, must know BEFOREHAND that the action needs refresh # then use attribute 'data-ajax'=>'false' # see app/views/sessions/new.html.erb for sample def create user = User.from_omniauth(env["omniauth.auth"]) session[:user_id] = user.id redirect_to '/mindapp/pending' rescue redirect_to root_path, :alert=> "Authentication failed, please try again." end def destroy session[:user_id] = nil # redirect_to '/mindapp/help' refresh_to root_path end def failure ma_log "Authentication failed, please try again." redirect_to root_path, :alert=> "Authentication failed, please try again." end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mindapp-0.0.2 | lib/generators/mindapp/templates/app/controllers/sessions_controller.rb |