method
ago
![Some documentation Importance_1](https://d2vfyqvduarcvs.cloudfront.net/images/importance_1.png?1349367920)
ago(time = ::Time.current)
public
Register or
log in
to add new notes.
lazylester -
July 2, 2014
![Default_avatar_30](https://www.gravatar.com/avatar/2892f8fe56ed73a3c774a5d03b91dc45?default=http://apidock.com/images/default_avatar_30.png&size=30)
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).