jrallison / authlogic_oauth

Authlogic OAuth is an extension of the Authlogic library to add OAuth support. OAuth can be used to allow users to login with their Twitter credentials.
authlogic-oauth.heroku.com
MIT License
165 stars 25 forks source link

Fix "undefined method `acts_as_authentic_config'" error when using rake #3

Open joost opened 14 years ago

joost commented 14 years ago

Replace following in lib/authlogic_oauth.rb. See:

if defined?(Authlogic) # Fixes "undefined method `acts_as_authentic_config'" error when using rake.
  ActiveRecord::Base.send(:include, AuthlogicOauth::ActsAsAuthentic)
  Authlogic::Session::Base.send(:include, AuthlogicOauth::Session)
  ActionController::Base.helper AuthlogicOauth::Helper
end
joost commented 14 years ago

Seems ruby/rails needs to actually load Authlogic. So calling only Authlogic would also be enough but I don't think it is really nice:

Authlogic # Simply only call it. No if statement.