Sha256: 87a6c4092f1ceda5200c5edda4d342928b020a5fc186a00da91d9ef674a1c245

Contents?: true

Size: 444 Bytes

Versions: 10

Compression:

Stored size: 444 Bytes

Contents

module Blogo::Admin
  class BaseController < Blogo::ApplicationController
    before_filter :ensure_authenticated!

    layout 'blogo/admin'


    private

    def ensure_authenticated!
      redirect_to blogo_admin_login_path unless blogo_current_user
    end

    def blogo_current_user
      @blogo_current_user ||= Blogo::User.find(session[:blogo_user_id]) if session[:blogo_user_id]
    end
    helper_method :blogo_current_user
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
blogo-0.1.1 app/controllers/blogo/admin/base_controller.rb
blogo-0.1.0 app/controllers/blogo/admin/base_controller.rb
blogo-0.0.10 app/controllers/blogo/admin/base_controller.rb
blogo-0.0.9 app/controllers/blogo/admin/base_controller.rb
blogo-0.0.8 app/controllers/blogo/admin/base_controller.rb
blogo-0.0.7 app/controllers/blogo/admin/base_controller.rb
blogo-0.0.6 app/controllers/blogo/admin/base_controller.rb
blogo-0.0.5 app/controllers/blogo/admin/base_controller.rb
blogo-0.0.4 app/controllers/blogo/admin/base_controller.rb
blogo-0.0.3 app/controllers/blogo/admin/base_controller.rb