I am having 2 similar problems with routing. 1. With Rails if I make a js request using jQuery I always have to append a ".js" extension to allow the request to be handled appropriately. If I don't append a js extension I get html formatted data back. Using Merb this never happened and worked like I thought it should.
2. Today I am having problems allowing xml requests to be handled by the controller. Even if I have a respond_to block that accepts xml requests, the html block will handle it instead. If I try the work around mentioned in problem #1 Rails throws an error of being unable to route the request. If I add a :format key to the specific route in the routes.rb file, that defaults to :html, it then works. Why is it that I have to allow for the :format in the xml case, but in the :js case I need the .js extension? Am I missing something? This seems a little too sloppy for Rails. -- 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---