Class: Glengarry::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/glengarry/application_controller.rb

Direct Known Subclasses

EmailLeadsController

Instance Method Summary collapse

Instance Method Details

#authenticateObject

This is a useful pattern I found in the Tolk source: github.com/tolk/tolk/blob/master/app/controllers/tolk/application_controller.rb



8
9
10
# File 'app/controllers/glengarry/application_controller.rb', line 8

def authenticate
  self.authenticator.bind(self).call if self.authenticator && self.authenticator.respond_to?(:call)
end