Hi Fred, Thanks a lot, it worked :)
Sexta-feira, 23 de Agosto de 2013 18:48:28 UTC+1, Frederick Cheung escreveu: > > > > On Friday, August 23, 2013 12:25:29 PM UTC+1, Rita Ferreira wrote: > on the routes.rb I have: >> >> Clinica::Application.routes.draw do >> >> resources :clinica >> >> resources :consultas >> >> >> on /views/consultas/new.html.erb I have a form, if I write the URL " >> http://localhost:3000/consultas/new" I get the form without problems. >> >> The problem here is that when I click on the button "Read More" (on the >> index default of my application on Clinica) I get the error "No route >> matches [POST] "/consultas/new"". I can't understand what is the mistake >> I'm doing. >> > > button_to does a post request by default. if you add a :method => :get > option to it then it should work > > Fred > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4725a220-bf7c-49b6-938f-6c405ed6a8c1%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.

