Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add to_key for rails 3, thanks to nzadrozny

  • Loading branch information...
commit 5661867e0ea8e572bb5b18e7afc874b3db253e3f 1 parent a78e063
@binarylogic binarylogic authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/authlogic/session/foundation.rb
View
4 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
Please sign in to comment.
Something went wrong with that request. Please try again.