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:
commit
3a86599304
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue