Sha256: 191e18006a9bc794733e83726a64eed3ac82399137401e5ee29c290d8dbe1bfb
Contents?: true
Size: 483 Bytes
Versions: 3
Compression:
Stored size: 483 Bytes
Contents
module Blogr class ApplicationController < ActionController::Base # layout "blogr/application" before_filter :authorize private helper_method :current_blogr_user helper_method :authorize def current_blogr_user if session[:user_id] @current_blogr_user ||= User.find(session[:user_id]) end rescue ActiveRecord::RecordNotFound end def authorize if current_blogr_user.nil? redirect_to login_path end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
blogr-0.0.8 | app/controllers/blogr/application_controller.rb |
blogr-0.0.7 | app/controllers/blogr/application_controller.rb |
blogr-0.0.6 | app/controllers/blogr/application_controller.rb |