method

pick_template_extension

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"