yaml = config.paths["config/secrets"].first if File.exist?(yaml) require "erb" all_secrets = YAML.load(ERB.new(IO.read(yaml)).result) || {} env_secrets = all_secrets[Rails.env] secrets.merge!(env_secrets.symbolize_keys) if env_secrets end # Fallback to config.secret_key_base if secrets.secret_key_base isn't set secrets.secret_key_base ||= config.secret_key_base # Fallback to config.secret_token if secrets.secret_token isn't set secrets.secret_token ||= config.secret_token secrets end end ͨͩͷHashΛmergeͯ͠ΔͬΆ͍ͷͰ ࠶ؼతʹAS::OrderedOptions͑Αͦ͞͏