Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,17 @@ Time.zone.now + 2.days
2.days.from_now
----

Use an instance of `ActiveSupport::Duration` as a receiver to calculate relative time.

[source,ruby]
----
# bad - It's confusing to read
created_at.since(1.minute)

# good
1.minute.since(created_at)
----

== Bundler

=== Dev/Test Gems [[dev-test-gems]]
Expand Down