I am currently working through the Rails Tutorial by Michael Hartl and have run into an error I can't understand.
There is a section where the tutorial explains how to create custom URI's in the routes.rb file. The tutorial explains that by coding this:
match '/about', to: 'static_pages#about'
named routes should automatically be created that look like this:
about_path => '/about'
about_url => 'http://localhost:3000/about'
The following section then helps you work through fixing up rspec tests by replacing certain bits of code with these variables. But when I do this, I end up failing every test because all the "automatically created variables" can't be found...
Can anyone explain to me why they aren't being found or where I can look to see if they were in fact created already.
rake routes
is your friend if you want to see all known routes, if you're using 3.2+ you can also have a look at the sextant gem github.com/schneems/sextantas: 'name'
option : guides.rubyonrails.org/routing.html#naming-routes