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"
Source Code
# File action_view/template_finder.rb, line 133 def pick_template_extension(template_path) find_template_extension_from_handler(template_path) || find_template_extension_from_first_render end
<code/>and<pre/>for code samples.