Skip to content

Instantly share code, notes, and snippets.

@mrjjwright
Created December 19, 2008 19:00
Show Gist options
  • Select an option

  • Save mrjjwright/38078 to your computer and use it in GitHub Desktop.

Select an option

Save mrjjwright/38078 to your computer and use it in GitHub Desktop.
def self.today
day = Time.zone.parse(DateTime.now.to_date.to_s).utc
return self.find(:all, :conditions => ['created_at >= ? and created_at < ?', day, day + 86400])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment