Skip to content

Commit

Permalink
Use actually defined methods, since and ago
Browse files Browse the repository at this point in the history
  • Loading branch information
aeroastro committed Sep 6, 2023
1 parent cc46154 commit a451ad1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1865,12 +1865,12 @@ Use an instance of `ActiveSupport::Duration` as a receiver to calculate relative
[source,ruby]
----
# bad - It's confusing to read
created_at.after(1.minute)
expiration_date.before(3.days)
created_at.since(1.minute)
expiration_date.ago(3.days)
# good
1.minute.after(created_at)
3.days.before(expiration_date)
1.minute.since(created_at)
3.days.ago(expiration_date)
----

== Bundler
Expand Down

0 comments on commit a451ad1

Please sign in to comment.