method

pick_template_extension

rails latest stable - Class: ActionView::TemplateFinder

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.1.0) is shown here.

pick_template_extension(template_path)
public

Gets the extension for an existing template with the given template_path. Returns the format with the extension if that template exists.

  pick_template_extension('users/show')
  # => 'html.erb'

  pick_template_extension('users/legacy')
  # => "rhtml"