mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Fixes deprecation warning about passing a template handler
in the template name while generating guide related pages like index, layout and credits
This commit is contained in:
@@ -137,7 +137,8 @@ module RailsGuides
|
||||
|
||||
if guide =~ /\.html\.erb$/
|
||||
# Generate the special pages like the home.
|
||||
result = view.render(:layout => 'layout', :file => guide)
|
||||
# Passing a template handler in the template name is deprecated. So pass the file name without the extension.
|
||||
result = view.render(:layout => 'layout', :file => $`)
|
||||
else
|
||||
body = File.read(File.join(source_dir, guide))
|
||||
body = set_header_section(body, view)
|
||||
|
||||
Reference in New Issue
Block a user