Sha256: 81476f50b6052de5fc1ac4e5bd6042e1bdd8e118537ebdccb5bb52e83a43df52

Contents?: true

Size: 353 Bytes

Versions: 3

Compression:

Stored size: 353 Bytes

Contents

class Smithy::BaseController < ApplicationController
  layout 'smithy/application'

  before_filter :authenticate_smithy_admin

  private

    def authenticate_smithy_admin
      unless smithy_current_user && smithy_current_user.smithy_admin?
        flash.alert = "Please login to continue."
        redirect_to smithy_login_path
      end
    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
smithycms-0.0.3 app/controllers/smithy/base_controller.rb
smithycms-0.0.2 app/controllers/smithy/base_controller.rb
smithycms-0.0.1 app/controllers/smithy/base_controller.rb