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.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to