Browse files

Fixed an exception when trying to save models outside of the controll…

…er process (e.g. in IRB)
  • Loading branch information...
1 parent a6c2e8d commit 541626973b317b75d3645fb5108d0006322adaf2 @bjeanes bjeanes committed with Oct 21, 2009
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/authlogic_oauth/acts_as_authentic.rb
3 lib/authlogic_oauth/acts_as_authentic.rb
@@ -89,6 +89,9 @@ def oauth_secret=(value)
def authenticating_with_oauth?
+ # Controller isn't available in all contexts (e.g. irb)
+ return false unless session_class.controller
# Initial request when user presses one of the button helpers
(session_class.controller.params && !session_class.controller.params[:register_with_oauth].blank?) ||
# When the oauth provider responds and we made the initial request

2 comments on commit 5416269


IMHO it's time to release a new version (1.0.9?).


Yep it is.

Please sign in to comment.