public Method

TemplateFinder.pick_template_extension(template_path)

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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.