Skip to content

Commit

Permalink
macro to summoning authenticator
Browse files Browse the repository at this point in the history
  • Loading branch information
mistersourcerer committed Mar 16, 2012
1 parent 0c40039 commit 06efeba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/application_controller.rb
Expand Up @@ -2,6 +2,11 @@ class ApplicationController < ActionController::Base
protect_from_forgery

private
def self.uses_authenticator(method_name = :auth)
define_method method_name do
@authenticator ||= Authenticator.new(session, request.env["omniauth.auth"])
end
end

def authenticator
@authenticator ||= Authenticator.new(session, request.env["omniauth.auth"])
Expand Down

0 comments on commit 06efeba

Please sign in to comment.