Skip to content

Commit

Permalink
Protect against undefined method add_acts_as_authentic_module' for …
Browse files Browse the repository at this point in the history
…ActiveRecord::Base:Class' error while running Rake tasks.
  • Loading branch information
mattenat committed Nov 12, 2009
1 parent 3e03e61 commit b6202f9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/authlogic_facebook_connect.rb
Expand Up @@ -3,6 +3,8 @@
require "authlogic_facebook_connect/session"
require "authlogic_facebook_connect/helper"

ActiveRecord::Base.send(:include, AuthlogicFacebookConnect::ActsAsAuthentic)
Authlogic::Session::Base.send(:include, AuthlogicFacebookConnect::Session)
ActionController::Base.helper AuthlogicFacebookConnect::Helper
if ActiveRecord::Base.respond_to?(:add_acts_as_authentic_module)
ActiveRecord::Base.send(:include, AuthlogicFacebookConnect::ActsAsAuthentic)
Authlogic::Session::Base.send(:include, AuthlogicFacebookConnect::Session)
ActionController::Base.helper AuthlogicFacebookConnect::Helper
end

0 comments on commit b6202f9

Please sign in to comment.