Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix compatibility with rails 3.x

  • Loading branch information...
commit d1ebb0481b1f1841c586a33bf63dc00968d538a3 1 parent fd6ad48
@soupmatt soupmatt authored
View
2  lib/casclient/tickets/storage.rb
@@ -29,7 +29,7 @@ def get_session_for_service_ticket(st)
session_id = read_service_session_lookup(st)
unless session_id.nil?
# This feels a bit hackish, but there isn't really a better way to go about it that I am aware of yet
- session = ActiveRecord::SessionStore.session_class.find_by_session_id(session_id)
+ session = ActiveRecord::SessionStore.session_class.find(:first, :conditions => {:session_id => session_id})
else
log.warn("Couldn't destroy session service ticket #{st} because no corresponding session id could be found.")
end
View
2  spec/support/shared_examples_for_ticket_stores.rb
@@ -50,7 +50,7 @@
end
context "the session" do
it "should be destroyed" do
- ActiveRecord::SessionStore.session_class.find_by_session_id(session.session_id).should be_nil
+ ActiveRecord::SessionStore.session_class.find(:first, :conditions => {:session_id => session.session_id}).should be_nil
end
end
it "should destroy session for the given service ticket" do
Please sign in to comment.
Something went wrong with that request. Please try again.