Skip to content

Commit

Permalink
Add in checks to make sure session_class is not nil
Browse files Browse the repository at this point in the history
  • Loading branch information
binarylogic committed Mar 27, 2009
1 parent 9be1f26 commit 3188817
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rdoc
@@ -1,6 +1,7 @@
== 2.0.4

* Added validates_uniqueness_of_login_field_options and validates_uniqueness_of_email_field_options configuration options
* Add in checks to make sure session_class is not nil.

== 2.0.3 released 2009-3-26

Expand Down
2 changes: 1 addition & 1 deletion lib/authlogic/acts_as_authentic/session_maintenance.rb
Expand Up @@ -74,7 +74,7 @@ def skip_session_maintenance
end

def update_sessions?
!skip_session_maintenance && session_class.activated? && !session_ids.blank? && persistence_token_changed?
!skip_session_maintenance && session_class && session_class.activated? && !session_ids.blank? && persistence_token_changed?
end

def get_session_information
Expand Down
2 changes: 1 addition & 1 deletion lib/authlogic/test_case.rb
Expand Up @@ -51,7 +51,7 @@ module Authlogic
module TestCase
# Activates authlogic with an Authlogic::TestCase::MockController object.
def activate_authlogic
Authlogic::Session::Base.controller = controller
Authlogic::Session::Base.controller = (@request && Authlogic::ControllerAdapters::AbstractAdapter.new(@request)) || controller
end

# The Authlogic::TestCase::MockController object passed to Authlogic to activate it. You can access this in your test.
Expand Down

0 comments on commit 3188817

Please sign in to comment.