I have one controller that has two routes. One is a "direct" route and
the other is a nested resource under another object. The two URLs are:
I have an AJAX form that submits data to a method via the GET method
update a div. This works as expected with the nested route. However
the bare or "direct" route's request headers that are sent to
controller from the AJAX call are "text/html,application/xhtml
+xml,application/xml;q=0.9,*/*;q=0.8" vs the proper "*/*;q=0.5, text/
I have tried different ways to force the client to send the request
- Setting data-type attribute to script in the form
charset=utf-8" in the controller
- Adding :format => :js in the URL path helper method
I know I have tried more but I cannot remember all that i have tried
in the last two days trying to figure this out. What is weird is how
the same code works for the nested route but does not work for the
bare version. I am using Rails 3.1.3 with Ruby 1.9.3p0.
Thanks for any help,
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to firstname.lastname@example.org.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.