class method
self.current
Ruby on Rails 3.1.12
Since v3.0.20Signature
self.current()
Returns Time.zone.today when Time.zone or config.time_zone are set, otherwise just returns Date.today.
Source
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 40
def current
::Time.zone ? ::Time.zone.today : ::Date.today
end
Defined in activesupport/lib/active_support/core_ext/date/calculations.rb line 40
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Date