Class: BlogBoi::ApplicationController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/blog_boi/application_controller.rb

Direct Known Subclasses

ArticlesController, CommentsController

Instance Method Summary collapse

Instance Method Details

#authenticate_adminObject

TBU



7
8
9
10
11
12
13
14
15
# File 'app/controllers/blog_boi/application_controller.rb', line 7

def authenticate_admin
  if !defined?(admin_signed_in?) 
    raise BlogBoi::MethodNotImplementedByParentApplication, "admin_signed_in?"
  elsif admin_signed_in?
    true
  else
    redirect_to root_path
  end
end