added rails code from http://guides.rubyonrails.org/getting_started.html