Permalink
Browse files

add to_key for rails 3, thanks to nzadrozny

  • Loading branch information...
binarylogic committed Sep 5, 2010
1 parent a78e063 commit 5661867e0ea8e572bb5b18e7afc874b3db253e3f
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/authlogic/session/foundation.rb
@@ -53,6 +53,10 @@ def inspect
"#<#{self.class.name}: #{credentials.blank? ? "no credentials provided" : credentials.inspect}>"
end
+ def to_key
+ new_record? ? nil : [ self.send(self.class.primary_key) ]
+ end
+
private
def build_key(last_part)
last_part

0 comments on commit 5661867

Please sign in to comment.