views:

29

answers:

1

I have a rails 3 template handler and would like to configure it not to use the layout. In rails2 we would do a

        ::ActionController::Base.exempt_from_layout :extension_name

But this method does not exist in Rails 3 any more. I did not find a place within the code where there is an option for a template engine not to run through the layout procedure.

Regards

A: 

The option has been deprecated and then removed.

Why do you need it? Unless you create a layout template, Rails shouldn't render the layout.

Simone Carletti
Because I am serving the same resource with two different templates. It might be returned as html if the client uses Accept: text/html or xml if the client requests Accept: application/xml or something else if the client requests Accept: something-else/something-elseSo I need to be able to have the alayout template (if the server allows html) in addition to the other template engine he is using.
Guilherme Silveira