Hi,
I have the following simple piece of code in one of my actions:
respond_to do |format|
format.js { redirect_to basket_url }
end
In Safari this works fine and the basket controller's show action is
called and returns a rjs response. However in Firefox it calls the
show action on basket but instead returns an html response, it doesn't
seem to detect the call came from a forwarded js request.
The only way I have found around this to get consistent results is:
respond_to do |format|
format.js { redirect_to formatted_basket_url(:format => :js) }
end
Is this correct?
On a related note I've also had instances where the order of the
format.js, format.html etc in the respond_to block has influenced what
has been rendered (mainly browsing with IE)?? Is there a reason or
pattern to this?
Thanks,
Andrew
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---