aboutsummaryrefslogtreecommitdiffstats
path: root/guides/rails_guides/helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'guides/rails_guides/helpers.rb')
-rw-r--r--guides/rails_guides/helpers.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/guides/rails_guides/helpers.rb b/guides/rails_guides/helpers.rb
index 6f4b0b492c..a6970fb90c 100644
--- a/guides/rails_guides/helpers.rb
+++ b/guides/rails_guides/helpers.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "yaml"
module RailsGuides
@@ -15,7 +17,7 @@ module RailsGuides
end
def documents_by_section
- @documents_by_section ||= YAML.load_file(File.expand_path("../../source/#{@lang ? @lang + '/' : ''}documents.yaml", __FILE__))
+ @documents_by_section ||= YAML.load_file(File.expand_path("../source/#{@language ? @language + '/' : ''}documents.yaml", __dir__))
end
def documents_flat