Upgrade to Rails 6.0 and apply new framework defaults
This commit is contained in:
@ -10,8 +10,8 @@ require 'telegraf/rails'
|
||||
|
||||
module CodeOcean
|
||||
class Application < Rails::Application
|
||||
# Initialize configuration defaults
|
||||
config.load_defaults 5.2
|
||||
# Initialize configuration defaults for originally generated Rails version.
|
||||
config.load_defaults 6.0
|
||||
|
||||
# Settings in config/environments/* take precedence over those specified here.
|
||||
# Application configuration can go into files in config/initializers
|
||||
@ -27,9 +27,21 @@ module CodeOcean
|
||||
# config.i18n.default_locale = :de
|
||||
config.i18n.available_locales = [:de, :en]
|
||||
|
||||
config.autoload_paths << Rails.root.join('lib')
|
||||
config.eager_load_paths << Rails.root.join('lib')
|
||||
config.assets.precompile += %w( markdown-buttons.png )
|
||||
# Add inflection for Zeitwerk
|
||||
ActiveSupport::Inflector.inflections(:en) do |inflect|
|
||||
inflect.acronym 'IO'
|
||||
end
|
||||
|
||||
extra_paths = %W[
|
||||
#{config.root}/lib
|
||||
]
|
||||
|
||||
# Add generators, they don't have a module structure that matches their directory structure.
|
||||
extra_paths << "#{config.root}/lib/generators"
|
||||
|
||||
config.add_autoload_paths_to_load_path = false
|
||||
config.autoload_paths += extra_paths
|
||||
config.eager_load_paths += extra_paths
|
||||
|
||||
config.action_cable.mount_path = '/cable'
|
||||
|
||||
|
Reference in New Issue
Block a user