-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy pathapplication.rb
More file actions
57 lines (43 loc) · 2.21 KB
/
Copy pathapplication.rb
File metadata and controls
57 lines (43 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# frozen_string_literal: true
require_relative 'boot'
require 'rails/all'
require 'csv'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module DMPRoadmap
# DMPRoadmap application
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.1
# 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.
# --------------------------------- #
# OVERRIDES TO DEFAULT RAILS CONFIG #
# --------------------------------- #
config.autoload_lib(ignore: %w[tasks])
# CVE-2022-32224: add some compatibility with YAML.safe_load
# Rails 5,6,7 are using YAML.safe_load as the default YAML deserializer
config.active_record.yaml_column_permitted_classes = [ActiveSupport::HashWithIndifferentAccess, Symbol, Date, Time]
# Have Zeitwerk skip generators because the generator templates are
# incompatible with the Rails module/class naming conventions
Rails.autoloaders.main.ignore(config.root.join('lib/generators'))
# HTML tags that are allowed to pass through `sanitize`.
config.action_view.sanitized_allowed_tags = %w[
p br strong em a table thead tbody tr td th tfoot caption ul ol li
]
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
# Enable escaping HTML in JSON.
config.active_support.escape_html_entities_in_json = true
# Allow controllers to access view helpers
# TODO: We should see what methods specifically are used by the controllers
# and include them specifically in the controllers. We should also consider
# moving our helper methods into Presenters if it makes sense
config.action_controller.include_all_helpers = true
# Set the default host for mailer URLs
config.action_mailer.default_url_options = { host: Socket.gethostname.to_s }
end
end