Js request / rendering issues

Two issues:

  1. Why does rails have a hard time detecting js calls? If I make a
    jquery ajax request to foo/bar it fails, but if I append a js extension
    it passes => foo/bar.js. It seems that ror ignores the request headers
    and only looks at the extension. Am I missing something?

  2. I am adding some ajax calls for some destroy requests and noticed
    that rails always wants to render back the destroy.html.xxx template.
    Obviously on a destroy ajax call I don’t want a template rendered.

The only way to get around this is to do:

respond_to do |r|
r.js { render :text => “”, :template => false }
end

Is there something that I am missing that is causing this?

I am currently using v2.1.0, although it is on the todo list to update
the site after the current upgrades.

Thanks for the help.