Following book Ruby on Rails Deep Dive by Sitepoint's Ruby Source.