Topic: Issue with UJS

Although I've successfully added ujs in one rails app, I'm having trouble in another, similar app. In the application.js, I've included the proper headers with the following:

//= require jquery
//= require jquery_ujs
//= require_tree .

The javascript files are included when I actually browse to the primary home page which is using the application layout, which includes the above mentioned javascirpt references. The form in the page is as follows:

<%= form_tag list_path, :remote => true, :id => 'frmBookResults', :method => :post do %>

But although the form tag contains :remote => true, and there's a route established for list_path, and a method in the controller to handle the request, the subsequent list.js.erb is ignored and I get a template not found error, because rails is processing the form request as html, which I can confirm in the log.

I've searched everywhere I could for a solutions, but can't figure out why my ujs isn't working for this particular app. Has anyone else had trouble with their rails form not processing as js with remote => true? Again, I have another app, with essentially the same gems, and it works. Compared the two apps over and over and can't see any difference in what I'm doing.

Any help or direction would be greatly appreciated.

Re: Issue with UJS

In your controller, are you responding to js or html?

controller.rb

respond_to do |format|
  format.js
end
Learning rails, one day at a time.

http://keilmiller.com

Re: Issue with UJS

Thanks for the response, but I forgot to mention that I'd already solved the issue here:

http://stackoverflow.com/questions/1380 … s-with-ujs