copy accroding to Ruby on Rails Tutorial