respond_to block being ignored?

I am designing a Rails application with two separate controller scripts,
say x_controller_1.rb and y_controller_2.rb, with both in
app/controllers directory. Now, I have a function in each controller
script that makes use of a respond_to block. The block looks like this:

respond_to do |format|

I have x.rhtml, x.rxml, y.rhtml, y.rmxl files in the app/views
directory. When I submit an HTTP request to x_controller with the
header "Accept: text/xml", the processed output from x.rxml is returned.
However, when a request with the previous Accept header is submitted to
y_controller, the processed output from y.rhtml is returned. Now, there
is no configuration between x_controller and y_controller, I have tried
to remove any caching that the Rails application has done for previous
accesses to these controllers, and I do not have the globalize plugin
installed in this Rails application. Has anyone else seen this behavior
before? If so, what is the solution to resolve this?


Sorry, in my previous post, I meant to say there is no configuration
difference between the two controllers. Can anyone shed some light on
this issue for me? Thanks!

Edward Liu wrote:

Could someone please respond to the trouble I am having? I need a
response ASAP. Thanks!