Wednesday, October 20, 2010

[Rails] Ajax, form_tag, accept headers, Rails 3

I am trying to do a search using an ajax call via a form_tag with
remote => true, a text_field_tag and a submit tag. The form_tag is
reaching the controller, but not as an ajax call. I am receiving a 406
Not acceptable error, which I believe is to do with the accept
headers. I think this might have something to do with my problem.
In my layout head I have:-
<%= javascript_include_tag
"prototype.js","scriptaculous.js","menu.js","rails.js" %>
and in the controller I have :-
respond_to do |format|
format.js
I am running my website on my local computer using Webrick Ruby .9.2
and Rails 3
I am stumped. Can anyone help me by pointing me in a direction to help
me solve this problem.

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate