What's the worst part of making cookies? Cleaning up.
Initially, I had set up code to set a cookie in the simplest fashion possible:
cookies[:my_cookie] = {:value => 'test', :expires => 1.year.from_now}
Cleanup was a snap:
cookies.delete :my_cookie
That was working great but to add some usability we decided that we wanted the cookie to be shared between multiple [...]
Entries Tagged as ‘Cookies’
June 12, 2006
Remove A Shared Cookie
May 12, 2006
Requiring and Testing Cookies
Requirement: Users must have cookies enabled to use the site. If they don't: give them some sort of graceful warning to let them know there's going to be trouble. Doesn't sound too bad… it ended up being much more of an adventure than I had expected.
Step 1. Add the cookie requirement
After a bit [...]
Filed under Cookies, Ruby, Test Driven Development (TDD), rails