I have the following:
time_range = (1.month.ago.beginning_of_month..1.month.ago.end_of_month) Comment.where(:created_at => time_range).count
User.where(name: 'Joe', email: 'joe@example.com')