Skip to content

Instantly share code, notes, and snippets.

@kano4
Created February 21, 2012 14:27
Show Gist options
  • Select an option

  • Save kano4/1876780 to your computer and use it in GitHub Desktop.

Select an option

Save kano4/1876780 to your computer and use it in GitHub Desktop.
delete logs in Rails
# 一ヶ月以上前のログを削除
WatchLog.delete_all(["created_at < ?", 1.month.ago])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment