mirror of https://github.com/rails/rails
Use safe nav operator when calling RailsGuides::Generator.new
Use String for direction of RailsGuides::Generator
This commit is contained in:
parent
7849e56ba2
commit
cb343ef672
|
@ -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 New Issue