Skip to content

Instantly share code, notes, and snippets.

@justinburdett
Created January 2, 2014 04:49
Show Gist options
  • Save justinburdett/8215183 to your computer and use it in GitHub Desktop.
Save justinburdett/8215183 to your computer and use it in GitHub Desktop.
Use this in your Heroku console to delete old stories from your Stringer RSS reader install when you approach the free 10,000 row limit in Heroku. It will delete all read, non-starred, non-keep unread stories from your reader. (Under normal circumstances, its never a good idea to delete data in a production setting.)
stories = Story.where(is_starred:false, is_read:true, keep_unread:false)
stories.each do |story| story.destroy end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment