Skip to content

Instantly share code, notes, and snippets.

@quake
Created December 15, 2013 13:06
Show Gist options
  • Save quake/7972812 to your computer and use it in GitHub Desktop.
Save quake/7972812 to your computer and use it in GitHub Desktop.
ActiveRecord输出上周被点击最多的文章标题
Blog.where(created_at: 1.week.ago.beginning_of_week..1.week.ago.end_of_week).order(view_counts: :desc).first.subject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment