diff options
author | Seiei Miyagi <hanachin@gmail.com> | 2015-07-05 14:12:48 +0900 |
---|---|---|
committer | Seiei Miyagi <hanachin@gmail.com> | 2015-10-05 23:53:05 +0900 |
commit | d3959c55e33dd39236d645eb19de243126dc2b1e (patch) | |
tree | 51f1848f5b30341699c1d48d2e6516b27ad8a3fe | |
parent | b2e490ef54ab18cce901976697f4f012310a3d12 (diff) | |
download | rails-d3959c55e33dd39236d645eb19de243126dc2b1e.tar.gz rails-d3959c55e33dd39236d645eb19de243126dc2b1e.tar.bz2 rails-d3959c55e33dd39236d645eb19de243126dc2b1e.zip |
concatenate @lang if @lang is presence to avoid useless slash
-rw-r--r-- | guides/rails_guides/helpers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/rails_guides/helpers.rb b/guides/rails_guides/helpers.rb index 38d5919159..5bf73da16c 100644 --- a/guides/rails_guides/helpers.rb +++ b/guides/rails_guides/helpers.rb @@ -15,7 +15,7 @@ module RailsGuides end def documents_by_section - @documents_by_section ||= YAML.load_file(File.expand_path("../../source/#@lang/documents.yaml", __FILE__)) + @documents_by_section ||= YAML.load_file(File.expand_path("../../source/#{@lang ? @lang + '/' : ''}documents.yaml", __FILE__)) end def documents_flat |