Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Michael Grosser's Profile

GitHub User: grosser


Comments by Michael Grosser


You could use UrlStore and just encode user id and expiration time inside the url, no new columns needed. Only drawback is that the token gets longer.

code = UrlStore.encode([, 2.hours.from_now])
if id, expires = UrlStore.decode(params[:id])
  if expires >