aboutsummaryrefslogtreecommitdiffstats
path: root/guides/rails_guides/helpers.rb
diff options
context:
space:
mode:
authorSeiei Miyagi <hanachin@gmail.com>2015-07-05 14:12:48 +0900
committerSeiei Miyagi <hanachin@gmail.com>2015-10-05 23:53:05 +0900
commitd3959c55e33dd39236d645eb19de243126dc2b1e (patch)
tree51f1848f5b30341699c1d48d2e6516b27ad8a3fe /guides/rails_guides/helpers.rb
parentb2e490ef54ab18cce901976697f4f012310a3d12 (diff)
downloadrails-d3959c55e33dd39236d645eb19de243126dc2b1e.tar.gz
rails-d3959c55e33dd39236d645eb19de243126dc2b1e.tar.bz2
rails-d3959c55e33dd39236d645eb19de243126dc2b1e.zip
concatenate @lang if @lang is presence to avoid useless slash
Diffstat (limited to 'guides/rails_guides/helpers.rb')
-rw-r--r--guides/rails_guides/helpers.rb2
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