Ruby on Rails
Friday, August 23, 2013
Hi,
-- I'm new in RoR, I need some help in the following situation:
I have 2 controllers, clinica and consultas.
Clinica is my default controller.
On /views/clinica, I have the index.html.erb default of my aplication, and I have there the command:
<%= button_to "Read More", new_consulta_path, :class=>"icon icon-arrow-right button", %>
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.
Does anyone know what is happening?
Any help is welcome!
Thank you,
Rita Ferreira
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/cc1132a8-aae5-433c-be99-7ad22da91a7d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment