module ActionView::Template::Handlers
def register_template_handler(*extensions, handler)
The handler must respond to `:call`, which will be passed the template
extensions. This can be used to implement new template types.
Register an object that knows how to handle template files with the given
def register_template_handler(*extensions, handler) raise(ArgumentError, "Extension is required") if extensions.empty? extensions.each do |extension| @@template_handlers[extension.to_sym] = handler end @@template_extensions = nil end