Skip to content

Commit

Permalink
add to_key for rails 3, thanks to nzadrozny
Browse files Browse the repository at this point in the history
  • Loading branch information
binarylogic committed Sep 5, 2010
1 parent a78e063 commit 5661867
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/authlogic/session/foundation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5661867

Please sign in to comment.