Writing my first, very simple Rails application, a simple application to track the work of one of our departments. The generated index page for people has a link to it to add a new person. I tried changing this to button_to, and he did not say that the path / people / new does not exist, although obviously this is happening since link_to goes to the same place.
I am using Rails 3 / Ruby 1.9.2. I have this code on the /app/views/people/index.html.erb page:
<%= link_to 'New Person', new_person_path %>
<%= button_to "New", :controller => "people", :action => "new" %>
Link link_to works. Button button_to failed:
Routing error No route matches "/ people / new"
Also tried just
<%= button_to 'New Person', new_person_path %>
The same mistakes. Odd