Hello! I have a rails 1.2 application which I recently ported to Rails 2.02. I added a mapping in the routes.rb file like this:
map.resources :accounts
Next, I implemented the
respond_to do |format| format.html {render :text => @account.to_xml} format.xml {render :xml => @account.to_xml} format.json {render :json => @account.to_json} end
thing. When I browse the following URL, localhost:3000/accounts/1.xml
Then the page is rendered in plain text though if we view the source of the page, we can see the pure XML generated by our application. But why the browser is rendering it as plain text instead of showing it in a tree structure as usually Firefox do.
However, if I create a new Rails application from scratch, it behaves as expected. What might be wrong?
Please guide me in this regard.
Note: I use Firefox 2.0.0.11
Regards, Mohsin