Creating a temporary link with rails


#1

Is there a plug-in or anything to create a temporary link in rails?

I understand that alot of websites use this. For example an email is
sent to a user with a temporary link to change their password, download
something, etc. The link is temporary and after this link is used once
it can not be used again.

Thanks


#2

For example an email is
sent to a user with a temporary link to change their password, download
something, etc. The link is temporary and after this link is used once
it can not be used again.

I thought these links were not temporary, but with special params.


#3

Colin wrote:

Is there a plug-in or anything to create a temporary link in rails?

I understand that alot of websites use this. For example an email is
sent to a user with a temporary link to change their password, download
something, etc. The link is temporary and after this link is used once
it can not be used again.

Thanks

you can create something unique for that user in the database when he do
the request (for example change his email), and then send a url with
that unique key. in the controller you can find the user by that key and
then show the page for change the email, when the user has changed his
email you can delete the key from the database… what do you think? :slight_smile:

(sorry for my english)


#4

jil wrote:

you can create something unique for that user in the database when he do
the request (for example change his email), and then send a url with
that unique key. in the controller you can find the user by that key and
then show the page for change the email, when the user has changed his
email you can delete the key from the database… what do you think? :slight_smile:

Thats a good idea, I think ill do something similar to this.
Thanks for the advice.

cheers