Flowdock
method

to_date

Importance_1
Ruby on Rails latest stable (v4.1.8) - 1 note - Class: ActiveSupport::CoreExtensions::DateTime::Conversions

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

These similar methods exist in v4.1.8:

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