Posts [ 3 ]

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:

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.