routes as explained in RoR tutorial 2nd Ed?
- by 7stud
The author, Michael Hartl, says:
Here the rule:
get "static_pages/home"
maps requests for the URI /static_pages/home to the home action in the StaticPages controller.
How? The type of request is given, the url is given, but where is the mapping to a controller and action? My tests all pass, though.
I also tried deleting all the actions in the StaticPagesController, which just looks like this:
class StaticPagesController < ApplicationController
def home
end
def about
end
def help
end
def contact
end
end
...and my tests still pass, which is puzzling.
The 2nd edition of the book(online) is really frustrating. Specifically, the section about making changes to the Guardfile is impossible to follow. For instance, if I instruct you to edit this file:
blah blah blah
dog dog dog
beetle beetle beetle
jump jump jump
and make these changes:
blah blah blah
.
.
.
go go go
.
.
.
jump jump jump
...would you have any idea where the line 'go go go' should be in the code?
And the hint for exercise 3.5-1 is flat out wrong. If the author would put up a comment section at the end of every chapter, the rails community could self-edit the book.