lib/devise/models/rememberable.rb in devise-1.1.rc1 vs lib/devise/models/rememberable.rb in devise-1.1.rc2

- old
+ new

@@ -63,10 +63,18 @@ # Remember token expires at created time + remember_for configuration def remember_expires_at remember_created_at + self.class.remember_for end + def cookie_domain + self.class.cookie_domain + end + + def cookie_domain? + self.class.cookie_domain != false + end + module ClassMethods # Create the cookie key using the record id and remember_token def serialize_into_cookie(record) [record.id, record.remember_token] end @@ -76,10 +84,10 @@ conditions = { :id => id, :remember_token => remember_token } record = find(:first, :conditions => conditions) record if record && !record.remember_expired? end - Devise::Models.config(self, :remember_for) + Devise::Models.config(self, :remember_for, :cookie_domain) end end end end