diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2011-11-10 22:36:20 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2011-11-10 22:36:20 +0530 |
commit | 74233d48e64650c26600f82ac23eb55c39fea342 (patch) | |
tree | 0c12d432a4faceade93058a23764821776b75ba3 /railties/guides/rails_guides | |
parent | 80f96ebcf5218cafd2b29e58c7b0c55a07e2fe22 (diff) | |
download | rails-74233d48e64650c26600f82ac23eb55c39fea342.tar.gz rails-74233d48e64650c26600f82ac23eb55c39fea342.tar.bz2 rails-74233d48e64650c26600f82ac23eb55c39fea342.zip |
Fixes deprecation warning about passing a template handler
in the template name while generating guide related pages
like index, layout and credits
Diffstat (limited to 'railties/guides/rails_guides')
-rw-r--r-- | railties/guides/rails_guides/generator.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/guides/rails_guides/generator.rb b/railties/guides/rails_guides/generator.rb index 4682ead66e..6f6d3bda80 100644 --- a/railties/guides/rails_guides/generator.rb +++ b/railties/guides/rails_guides/generator.rb @@ -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) |