ruby on rails - How do I send a user a temporary, expiring URL using ActionMailer? -
i have ruby/rails app class, engagements, , actionmailer mailer sends out mail each time engagement created. want include link in email goes page on site creates , displays item user. want link expire after 1 click , want real url (website.com/items/itemid, example) it's going not shown. how can achieve this? thank on this.
you add 2 fields model: token , has_expired (default: false) model.
actionmailer send link generated token, once user click link , token validated, set has_expired true.
if user tries go again, expired true don't show page ... guess same thing happen if user tried go invalid token.
Comments
Post a Comment