aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorYosuke Kabuto <bluewhale1982@gmail.com>2018-12-05 09:55:22 +0900
committerYosuke Kabuto <bluewhale1982@gmail.com>2018-12-05 12:41:07 +0900
commitcb343ef672d59ad7be71858568fe7ffcc81e3280 (patch)
treef5ed2e7b003af11e5db4898d0a0d4b5ed00a8007 /guides
parent7849e56ba201247f7a605131dd067b9122be1c71 (diff)
downloadrails-cb343ef672d59ad7be71858568fe7ffcc81e3280.tar.gz
rails-cb343ef672d59ad7be71858568fe7ffcc81e3280.tar.bz2
rails-cb343ef672d59ad7be71858568fe7ffcc81e3280.zip
Use safe nav operator when calling RailsGuides::Generator.new
Use String for direction of RailsGuides::Generator
Diffstat (limited to 'guides')
-rw-r--r--guides/rails_guides.rb2
-rw-r--r--guides/rails_guides/generator.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/guides/rails_guides.rb b/guides/rails_guides.rb
index 28a7c94ca9..a72acdbd06 100644
--- a/guides/rails_guides.rb
+++ b/guides/rails_guides.rb
@@ -26,5 +26,5 @@ RailsGuides::Generator.new(
only: env_value["ONLY"],
kindle: env_flag["KINDLE"],
language: env_value["GUIDES_LANGUAGE"],
- direction: env_value["DIRECTION"].to_sym
+ direction: env_value["DIRECTION"]
).generate
diff --git a/guides/rails_guides/generator.rb b/guides/rails_guides/generator.rb
index 1f0a2063f2..48e90510e1 100644
--- a/guides/rails_guides/generator.rb
+++ b/guides/rails_guides/generator.rb
@@ -17,7 +17,7 @@ module RailsGuides
class Generator
GUIDES_RE = /\.(?:erb|md)\z/
- def initialize(edge:, version:, all:, only:, kindle:, language:, direction: :ltr)
+ def initialize(edge:, version:, all:, only:, kindle:, language:, direction: "ltr")
@edge = edge
@version = version
@all = all
@@ -118,7 +118,7 @@ module RailsGuides
def copy_assets
FileUtils.cp_r(Dir.glob("#{@guides_dir}/assets/*"), @output_dir)
- if @direction == :rtl
+ if @direction == "rtl"
overwrite_css_with_right_to_left_direction
end
end