Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add persisted? for rails 3, thanks to nzadrozny

  • Loading branch information...
commit 66ed79515919fe13016911b10ebe734cf8718dc7 1 parent 5661867
Ben Johnson binarylogic authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/authlogic/session/foundation.rb
4 lib/authlogic/session/foundation.rb
View
@@ -53,6 +53,10 @@ def inspect
"#<#{self.class.name}: #{credentials.blank? ? "no credentials provided" : credentials.inspect}>"
end
+ def persisted?
+ !(new_record? || destroyed?)
+ end
+
def to_key
new_record? ? nil : [ self.send(self.class.primary_key) ]
end
Please sign in to comment.
Something went wrong with that request. Please try again.