Monthly Archives: September 2010

Best ways to populate dynamic array of numbers in ruby

Array of years using range((yr=Date.current.year)-9..yr).to_a#=> [2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010]Array of years using lambda Array.new(10){|i| Date.current.year-i}#=> [2010, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001]Array of monthsDate::MONTHNAMES.compact#=> [“January”, “February”, “March”, “April”, “May”, “June”, “July”, … Continue reading

Posted in Ruby | 1 Comment

Rails 3 Beautiful Code

Check out this SlideShare Presentation: Rails 3 Beautiful Codehttp://static.slidesharecdn.com/swf/ssplayer2.swf?doc=beautifulcodeinrails3-greggpollack-100218130149-phpapp02&stripped_title=rails-3-beautiful-code-3219240 View more presentations from GreggPollack.

Posted in General | Leave a comment