i followed directions step 5. there view folder called layouts file called application.html.erb automatically created tutorial hasn't mentioned @ all. don't know if i'm supposed delete or leave alone. created view appears in explorer welcome folder index.html.erb file, edited file show html , edited routes.rb root point welcome page following exact steps in section 4.3 setting application home page.
viewing project in browser pulled error message wrong application.html.erb hadn't touched. temporarily replaced contents shouldn't here , refreshed, sure enough "this shouldn't here" appears in browser @ localhost:3000 instead of contents of index.html.erb
went command prompt see if changing route had worked , assume did:
c:\users\susan\ruby_projects\blog>rake routes prefix verb uri pattern controller#action welcome_index /welcome/index(.:format) welcome#index root / welcome#index why showing other file instead of mine when open in browser if routes go mine?
layouts/application.html.erb default file loaded on every page of rails application, unless specify not to, used having same pattern through out website, , make code dry. can learn more here layouts & rendering
Comments
Post a Comment