I would like to use only the perishable_token
feature from authlogic on this开发者_如何转开发 model and nothing else. Here's what I've tried so far that's failed:
class EmailInvite < ActiveRecord::Base
acts_as_authentic do |c|
c.disable_perishable_token_maintenance = true
c.maintain_sessions = false
end
end
I'd appreciate any help.
Ended up just using Authlogic::Random.friendly_token
to generate the token and then did everything else outside of authlogic:
class EmailInviteObserver < ActiveRecord::Observer
def after_create(email_invite)
email_invite.perishable_token = Authlogic::Random.friendly_token
email_invite.save
end
end
精彩评论