1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #34620 from ysksn/use_safe_navigation_operator_for_railsguides_generator_constructor

Use String for direction of RailsGuides::Generator#new
This commit is contained in:
Yuji Yaginuma 2018-12-05 13:24:20 +09:00 committed by GitHub
commit 3a86599304
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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