Hey, how do I set a scope in rails 3 to todays records?
This doent work, yet. I get no data.
class MyModel < ActiveRecord::Base scope :today, :con
IMO this is the most understandable way to do it.
def self.created_today where("created_at >= ? AND created_at < ?", Date.today, Date.tomorrow) end