ruby on rails - RailsTutorial Chp 3 (Section 3.2.2) -


here's issue section 3.2.2 adding page:

they intentionally left out creating page (in section 3.1.2) teach me how use tdd guide me through development process. progressed through adding code spec tests, route, , staticpages controller (listings 3.13, 3.14 , 3.15 steps in between).

however when came step right before listing 3.16 had tilt head. here's text: "to solve issue, add view. involves creating new file called about.html.erb in app/views/static_pages directory contents shown in listing 3.16."

my question how "add view , create new file called about.html.erb in app/views/static_pages directory"? added action staticpages controller doesn't virtue of test $ bundle exec rspec... says i'm missing "template" or view. yet next step "involves creating new file called about.html.erb" no direction on how.

the last time remember creating static page files section 3.1.2 using $ rails generate controller staticpages home --no-test-framework created home.html.erb , help.html.erb. ran $ rails generate controller staticpages --no-test-framework. asked if wanted overwrite file app/controllers/static_pages_controller.rb , said no; yet, did create about.html.erb file.

i got result needed didn't feel right. taking time me.

they mean create file using chosen text editor.

#here how nano nano app/views/static_pages/about.html type in text ctrl-o save  #here how vi  vi app/views/static_pages/about.html insert mode type in text esc :wq  save   #if want create empty file touch app/views/static_pages/about.html 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -