Observe_field is not present in Rails 3, it is available as part of a plugin. However, I would like to use the Rails 3 UJS style to get a similar functionality.
Here is my code, following tips from this blog post:
// _form.html.erb:
// script inside _form: $document.ready(function($) { // when the #search field changes $("#xpath_to_title").change(function() { // make a POST call and replace the content $.post(, function(data) { $("#title").update(data); }); }); })
I added this match:
// routes.rb match '/:execute_query(.:format)' => 'vendors#execute_query', :as => :execute_query
But I get this routing error:
No route matches {:controller=>"vendors", :action=>"execute_query"}