Created
May 18, 2011 12:12
-
-
Save Electron-libre/978462 to your computer and use it in GitHub Desktop.
devise.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module HectorFetch | |
module InstanceMethods | |
def service_with_fetch | |
res = service_without_fetch | |
logger.info("in with_fetch #{current_user}") | |
current_user.update_from_hector | |
res | |
end | |
end | |
def self.included(base) | |
base.class_eval do | |
include InstanceMethods | |
alias_method_chain :service, :fetch | |
end | |
end | |
end | |
Taxman::Application.config.after_initialize do | |
class Devise::CasSessionsController | |
include HectorFetch | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment