Skip to content

Commit a451ad1

Browse files
committed
Use actually defined methods, since and ago
1 parent cc46154 commit a451ad1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,12 +1865,12 @@ Use an instance of `ActiveSupport::Duration` as a receiver to calculate relative
18651865
[source,ruby]
18661866
----
18671867
# bad - It's confusing to read
1868-
created_at.after(1.minute)
1869-
expiration_date.before(3.days)
1868+
created_at.since(1.minute)
1869+
expiration_date.ago(3.days)
18701870
18711871
# good
1872-
1.minute.after(created_at)
1873-
3.days.before(expiration_date)
1872+
1.minute.since(created_at)
1873+
3.days.ago(expiration_date)
18741874
----
18751875

18761876
== Bundler

0 commit comments

Comments
 (0)