Given:
- A
FooControllerwith abaraction - An ActionView template handler for the
customextension - A template at
app/views/foo/bar.custom
Is there a way to make Rails render that template only for HTML requests without renaming the template to bar.html.custom?
I figured out how to do this using a custom
ActionView::Responder. See https://github.com/netzpirat/haml_coffee_assets/issues/80 for details of why this was needed and how I solved it.