Created
March 1, 2016 08:32
-
-
Save universal/997d3942349c3cc44b87 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Running via Spring preloader in process 678 | |
| Loading development environment (Rails 4.2.5) | |
| 2.2.3 :001 > 1.month.ago | |
| => Mon, 01 Feb 2016 08:30:40 UTC +00:00 | |
| 2.2.3 :002 > 1.try(:month) | |
| => 1 month | |
| 2.2.3 :003 > 1.try(:month).try(:ago) | |
| => Mon, 01 Feb 2016 08:30:58 UTC +00:00 | |
| 2.2.3 :004 > 1.try('month').try('ago') | |
| => Mon, 01 Feb 2016 08:31:08 UTC +00:00 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment