2011-04-21から1日間の記事一覧
ApplicationController に以下のような認証用のメソッドを定義する事は、よくあると思います。 # coding: utf-8 class ApplicationController < ActionController::Base # 略 def current_user # ログイン中のユーザオブジェクトを返す end def logged_in? #…
ApplicationController に以下のような認証用のメソッドを定義する事は、よくあると思います。 # coding: utf-8 class ApplicationController < ActionController::Base # 略 def current_user # ログイン中のユーザオブジェクトを返す end def logged_in? #…