Class: BrickLayer::BaseController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/brick_layer/base_controller.rb

Instance Method Summary collapse

Instance Method Details

#authenticateObject



9
10
11
# File 'app/controllers/brick_layer/base_controller.rb', line 9

def authenticate
  request.format.html? ? authenticate_with_session : filter_public_responses
end

#current_administratorObject



13
14
15
# File 'app/controllers/brick_layer/base_controller.rb', line 13

def current_administrator
  @current_administrator ||= BrickLayer::Administrator.find(session[:administrator_id]) if session[:administrator_id]  
end