I'm new on RoR and I need help because I can't find the mistake.
I have 2 controllers, Clinica (default) and Consultas.
On /views/clinica I have the index.html.erb where I have the command:
<%= button_to "Read More", new_consulta_path, :class=>"icon icon-arrow-right button", %>
On the /views/consultas I have a new.html.erb file where I have a form. If I type the URL on the browser
I get the form without problems.
On my routes.rb file I have:
The problem is that when I'm in the index.html.erb (Clinica) and I click on the button "Read More" to go to the new.html.erb (consultas) file I get the error:
No route matches [POST] "/consultas/new"
Does anyone know why is this happening? Any help is welcome.