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

Are you using respond_to in the controller’s action to set the output
type?

On Sep 7, 1:14 pm, Gioele B. [email protected]

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs