GeoRSS aggregator and Layar augmented reality server
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

sessions_controller.rb 415 B

12345678910111213141516171819
  1. class SessionsController < ApplicationController
  2. def new
  3. end
  4. def create
  5. user = login(params[:email], params[:password], params[:remember_me])
  6. if user
  7. redirect_back_or_to root_url, :notice => "Logged in OK"
  8. else
  9. flash.now.alert = "Email or password was invalid"
  10. render :new
  11. end
  12. end
  13. def destroy
  14. logout
  15. redirect_to root_path, :notice => "Logged out"
  16. end
  17. end