method
ago
ago(time = ::Time.now)
public
Register or
log in
to add new notes.
lazylester -
July 2, 2014
0 thanks
time is represented in the Rails app's timezone
From the description of Time.current (which is a Rails extension of Ruby’s native Time class)
“Returns Time.zone.now when Time.zone or config.time_zone are set, otherwise just returns Time.now.”
so 3.days.ago, for example, is in the application’s configured timezone (if it’s configured).