{"issue":{"state":"open","created_at":"2011-08-29T18:49:51Z","updated_at":"2011-12-13T23:18:04Z","user":{"gravatar_id":"4698d387cdde58a95c8dc7f8d198cb48","id":358882,"url":"https://api.github.com/users/nuclearsandwich","avatar_url":"https://secure.gravatar.com/avatar/4698d387cdde58a95c8dc7f8d198cb48?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"nuclearsandwich"},"comments":11,"body":"When using Redis::Objects' very handy model attributes, the redis keys are not cleaned up upon model deletion.\r\n\r\nI propose to add a cleanup method which will check `Redis::Objects.redis` for any keys belonging to the current object and delete any found.\r\n\r\nThis can then be added as a before_delete hook to active record or similar hooks for other ORMs, keeping it flexible. If this is welcome I will start out by adding failing tests to displaying the current behavior and then implementing my solution as suggested above.\r\n\r\nI would love your thoughts Nate.","assignee":null,"id":1513081,"number":40,"labels":[],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"Model keys persist in Redis after ActiveRecord::Base model destruction","html_url":"https://github.com/nateware/redis-objects/issues/40","closed_at":null,"url":"https://api.github.com/repos/nateware/redis-objects/issues/40","milestone":null},"action":"created","comment":{"created_at":"2011-12-13T23:18:04Z","updated_at":"2011-12-13T23:18:04Z","user":{"gravatar_id":"4698d387cdde58a95c8dc7f8d198cb48","id":358882,"url":"https://api.github.com/users/nuclearsandwich","avatar_url":"https://secure.gravatar.com/avatar/4698d387cdde58a95c8dc7f8d198cb48?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"nuclearsandwich"},"body":"I finished a hacked out implementation, but never got the tests passing or cleaned it up, then I got hit with a wave of rough schoolweeks. I am not at the computer with my work on it at this time. Tonight I'll push what I had up to [my branch](https://github.com/nuclearsandwich/redis-objects) If you're interested in working on it from there feel free. Otherwise I won't get to it until after the new year. But, if you don't beat me to it, I *will* get to it.\r\n\r\nSorry for the delays all, it was a rough semester.","id":3132532,"url":"https://api.github.com/repos/nateware/redis-objects/issues/comments/3132532"}}