sample code of RailsGuides