We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f56a4a commit cc46154Copy full SHA for cc46154
README.adoc
@@ -1860,6 +1860,19 @@ Time.zone.now + 2.days
1860
2.days.from_now
1861
----
1862
1863
+Use an instance of `ActiveSupport::Duration` as a receiver to calculate relative time.
1864
+
1865
+[source,ruby]
1866
+----
1867
+# bad - It's confusing to read
1868
+created_at.after(1.minute)
1869
+expiration_date.before(3.days)
1870
1871
+# good
1872
+1.minute.after(created_at)
1873
+3.days.before(expiration_date)
1874
1875
1876
== Bundler
1877
1878
=== Dev/Test Gems [[dev-test-gems]]
0 commit comments