| Class | EditorRequest |
| In: |
app/models/editor_request.rb
|
| Parent: | ActiveRecord::Base |
editor would like to become an editor for person. Sent in an email with link keyed by token. Sends email with link after_create. See EditorRequestMailer.
Send email
# File app/models/editor_request.rb, line 29
29: def after_create
30: EditorRequestMailer.deliver_request(self)
31: end
Set to expire in 1 week. Auto-set token.
# File app/models/editor_request.rb, line 18
18: def before_validation
19: self.email = person.try(:email)
20: self.expires_at = 1.week.from_now
21: self.token = Authlogic::Random.friendly_token
22: end