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|
format.html
format.xml
end
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?
Thanks,
Edward
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
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:> 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| > format.html > format.xml > end > > 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? > > Thanks, > Edward-- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Could someone please respond to the trouble I am having? I need a response ASAP. Thanks! -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---