Gioele Barabucci
2007-Sep-07 17:14 UTC
How to discover Content-Type in ApplicationController
How can I discover the Content-Type of the document that is about to be outputted by the current request? I''m inside an after_filter in ApplicationController. headers{} does not contain the Content-Type field when the filter is called. -- Gioele -- 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 -~----------~----~----~----~------~----~------~--~---
Are you using respond_to in the controller''s action to set the output type? On Sep 7, 1:14 pm, Gioele Barabucci <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> How can I discover the Content-Type of the document that is about to be > outputted by the current request? > > I''m inside an after_filter in ApplicationController. headers{} does not > contain the Content-Type field when the filter is called. > > -- > Gioele > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---
Gioele Barabucci
2007-Sep-07 18:57 UTC
Re: How to discover Content-Type in ApplicationController
Hardbap wrote:> Are you using respond_to in the controller''s action to set the output > type?I''m trying to put this into a plugin, so I don''t know what has been done before. This is why I''m working inside ApplicationController. -- Gioele -- 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 -~----------~----~----~----~------~----~------~--~---