# frozen_string_literal: true

require_relative 'boot'

# We don't need active_record
# require 'rails/all'

# active_record is what we're not going to use it, so comment it "just in case"
# require "active_record/railtie"

# This is not loaded in rails/all but inside active_record so add it if
# you want your models work as expected
require 'active_model/railtie'
# And now the rest
require 'action_controller/railtie'
# require 'action_mailer/railtie'
require 'action_view/railtie'
# require 'active_job/railtie'
require 'action_cable/engine'
# require 'active_storage/engine'
require 'sprockets/railtie'
# require 'rails/test_unit/railtie'

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module ProgrammingsamResume
  class Application < Rails::Application
    # Initialize configuration defaults for originally generated Rails version.
    config.load_defaults 6.0

    # Initialize configuration for translation
    config.i18n.load_path += Dir[Rails.root.join('config',
                                                 'locales',
                                                 '**',
                                                 '*.{rb,yml}')]
    config.i18n.default_locale = :fr
    config.i18n.available_locales = %i[fr en]
    config.i18n.fallbacks = [I18n.default_locale]

    # Allow custom error pages
    config.exceptions_app = routes

    # Add environments for Skylight Errors Handler
    config.skylight.environments += ['development']

    # Settings in config/environments/* take precedence over
    # those specified here.
    # Application configuration can go into files in config/initializers
    # -- all .rb files in that directory are automatically loaded after loading
    # the framework and any gems in your application.
  end
end
