Flowdock
method

to_date

Importance_1
v2.3.2 - Show latest stable - 1 note - Class: ActiveSupport::CoreExtensions::DateTime::Conversions
to_date() public

Converts self to a Ruby Date object; time portion is discarded

Show source
Register or log in to add new notes.
February 4, 2009
0 thanks

usage example

code

class MyModel < ActiveRecord::Base
  def created_today?
    self.created_on.to_date == Date.today
  end
end