Peter Michaux a écrit :> With Rails 1.2 it looks like the respond_to blocks use the extension
> on the URL to determine the "wants" of the requests. Is this
instead
> of using the accepts header or now there are two options on how to do
> this?
Both work, with the URL suffix holding precedence over the Accept
header.> When we send an Ajax request for the results of an rjs template should
> we be sending the url with a ".js" file extension? Do we manually
add
> this to the URL?
You can either use the suffix or write the Accept
header.> Does it matter if we are using the new REST routes or not?
No, it''s a separate route from the map.resources thing:
map.connect '':controller/:action/:id.:format''
So it works with all kinds of URLs, not just RESTful ones.
--
Christophe Porteneuve a.k.a. TDD
"[They] did not know it was impossible, so they did it." --Mark Twain
Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---