Skip to content

Instantly share code, notes, and snippets.

@gerred
Created April 7, 2011 22:11
Show Gist options
  • Save gerred/908877 to your computer and use it in GitHub Desktop.
Save gerred/908877 to your computer and use it in GitHub Desktop.
after_create :destroy_orphan
def destroy_orphan
destroy if state == "cart"
end
handle_asynchronously :destroy_orphan, :run_at => Proc.new { 48.hours.from_now }
@tbeseda
Copy link

tbeseda commented Apr 7, 2011

this is crap, Gerred

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment