<% form_tag :action => ‘detail’ do %>
Search for Sales Order Number:
<%= text_field_with_auto_complete :sales_order, :id %>
<%= submit_tag " Go "%>
<% end %>
And I have the following in my controller:
auto_complete_for :sales_order, :id
This worked fine in 1.5, but now that I’ve upgraded to Rails 2.0.2, and
installed the auto_complete plugin, it doesn’t work. The autocomplete
simply never happens. I can see the stylesheet change, because
everything on the page gets smaller.
Yes, I did have the protect_from_forgery option in the controller. I
turned it off and now it works. Is there anyway to make this work and
still have CSRF?
Yes, I did have the protect_from_forgery option in the controller. I
turned it off and now it works. Is there anyway to make this work and
still have CSRF?
You can turn the protection off for Ajax requests
(skip_before_filter :verify_authenticity_token) or apply this patch (I
have not personally tried it yet):
You can turn the protection off for Ajax requests
(skip_before_filter :verify_authenticity_token) or apply this patch (I
have not personally tried it yet):
http://dev.rubyonrails.org/ticket/10059
Thank you so much for your help!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.