Skip to content

Instantly share code, notes, and snippets.

@unnitallman
Created June 6, 2011 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unnitallman/1010056 to your computer and use it in GitHub Desktop.
Save unnitallman/1010056 to your computer and use it in GitHub Desktop.
Setting a cookie with an expiry time
cookies[:survey_user_id] = { :value => self.current_user.id.to_s, :expires => 1.year.from_now }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment