I have an index.rhtml is rendered when the (main)controller is loaded.
The page contains some check boxes and a submit button. See form code
below. When I click the submit button, I get a 404. I don’t know how to
post this data back to my controller where method “addvisit” is waiting.
It works in WEBrick no problem, but doesn’t work in fcgi on DreamHost.
I am guessing I just know how to make the route connection. I have this
route in there and that worked for rendering the index page
map.connect ‘’, :controller => “AddPatientVisit”
I add this line below it, but it doesn’t seem to do anything.
map.connect ‘’, :controller => “AddPatientVisit”, :action =>
“addvisit”
Here is the last production.log entry:
ActionController::RoutingError (Recognition failed for “/addvisit”):
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:469:in
recognition_failed' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:459:in
recognize!’
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:141:in
process_request’
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:53:in
process!' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in
each_cgi’
/usr/lib/ruby/1.8/fcgi.rb:597:in each' /usr/lib/ruby/1.8/fcgi.rb:597:in
each_cgi’
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in
process!' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in
process!’
dispatch.fcgi:25
Here is my index.rhtml code:
Patient #1<%= check_box(“patient”, ‘1’, {:checked => ‘checked’},
“yes”) %>
Patient #2<%= check_box(“patient”, ‘2’, {:checked => ‘checked’},
“yes”) %>
Patient #4<%= check_box(“patient”, ‘4’, {:checked => ‘checked’},
“yes”) %>
Patient #8<%= check_box(“patient”, ‘8’, {:checked => ‘checked’},
“yes”) %>
Patient #9<%= check_box(“patient”, ‘9’, {:checked => ‘checked’},
“yes”) %>
Thank you for your help!
-Hunter