Funny method in Rails

Posted by Bryan Noll on September 4th, 2007 in Open Source Trends

So, I'm chugging along, enjoying myself, writing some RoR code, and run across one of the funnier method names I've ever seen.  I had to make an effort to use it, so here it is… I'm using it in as many yml fixtures as I can.

 

created_at: <%= 1.fortnight.ago.to_s :db %>

 

Fortnight?  A fortnight?  Are there really enough webapps written that require time to be broken into chunks of fortnights to warrant a 'fortnight' method?  I honestly don't care, I just think it's funny that 'fortnight' made it into the Rails datetime extension library.

It reminds me of a quote from Abe Simpson.  

"The metric system is the tool of the devil! My car gets 40 rods to the hogshead and that's the way I likes it." 

 


Comments are closed.



Find us on LinkedIn Add us on Facebook! Add us on Google Plus! Chat with Us

Archives

Categories

About Us

OpenLogic helps enterprises use open source software by providing open source support, scanning, governance, and cloud solutions. For more on OpenLogic, go to www.openlogic.com.