class Rails::Generators::AppGenerator

def initialize(*args)

def initialize(*args)
  super
  if !options[:skip_active_record] && !DATABASES.include?(options[:database])
    raise Error, "Invalid value for --database option. Supported preconfigurations are: #{DATABASES.join(", ")}."
  end
  # Force sprockets and JavaScript to be skipped when generating API only apps.
  # Can't modify options hash as it's frozen by default.
  if options[:api]
    self.options = options.merge(skip_asset_pipeline: true, skip_javascript: true).freeze
  end
  if options[:minimal]
    self.options = options.merge(
      skip_action_cable: true,
      skip_action_mailer: true,
      skip_action_mailbox: true,
      skip_action_text: true,
      skip_active_job: true,
      skip_active_storage: true,
      skip_bootsnap: true,
      skip_dev_gems: true,
      skip_javascript: true,
      skip_jbuilder: true,
      skip_system_test: true,
      skip_hotwire: true).freeze
  end
  @after_bundle_callbacks = []
end