Skip to content

Commit 663bfdd

Browse files
committed
removed comments
1 parent 9e701ab commit 663bfdd

1 file changed

Lines changed: 11 additions & 55 deletions

File tree

config/application.rb

Lines changed: 11 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -13,88 +13,55 @@
1313
module DMPRoadmap
1414

1515
class Application < Rails::Application
16-
# Set dmp_core version here
16+
1717
config.x.app_version = "2025.11"
1818

19-
# Initialize configuration defaults for originally generated Rails version.
2019
config.load_defaults 5.2
2120

22-
# Settings in config/environments/* take precedence over those specified here.
23-
# Application configuration can go into files in config/initializers
24-
# -- all .rb files in that directory are automatically loaded after loading
25-
# the framework and any gems in your application.
26-
27-
# --------------------------------- #
28-
# OVERRIDES TO DEFAULT RAILS CONFIG #
29-
# --------------------------------- #
30-
31-
# Rails 6+ adds middleware to prevent DNS rebinding attacks:
32-
# https://guides.rubyonrails.org/configuring.html#actiondispatch-hostauthorization
33-
#
34-
# This allows us to define the hostname and add it to the whitelist. If you attempt
35-
# to access the site and receive a 'Blocked host' error then you will need to
36-
# set this environment variable
37-
# config.hosts << '.lvh.me'
38-
# hosts.each { |host| config.hosts << host }
39-
40-
# config.hosts << ENV['DMPROADMAP_HOST'] if ENV['DMPROADMAP_HOST'].present?
41-
4221
hosts = ENV.fetch('DMPROADMAP_HOSTS').split(',')
43-
hosts.each { |host| Rails.application.config.hosts << host }
22+
23+
config.hosts.each { |host| Rails.application.config.hosts << host }
4424

4525
config.logger = ActiveSupport::Logger.new("log/#{Rails.env}.log", "daily")
4626

4727
config.autoload_paths += %W[#{config.root}/lib]
4828

49-
# HTML tags that are allowed to pass through `sanitize`.
5029
config.action_view.sanitized_allowed_tags = %w[
5130
p br strong em a table thead tbody tr td th tfoot caption ul ol li
5231
]
5332

54-
# Configure sensitive parameters which will be filtered from the log file.
5533
config.filter_parameters += [:password]
5634

57-
# Enable escaping HTML in JSON.
5835
config.active_support.escape_html_entities_in_json = true
5936

60-
# Allow controllers to access view helpers
61-
# TODO: We should see what methods specifically are used by the controllers
62-
# and include them specifically in the controllers. We should also consider
63-
# moving our helper methods into Presenters if it makes sense
6437
config.action_controller.include_all_helpers = true
6538

66-
# Set the default host for mailer URLs
67-
#config.action_mailer.default_url_options = { host: Socket.gethostname.to_s }
68-
# config.action_mailer.default_url_options = { host: "https://dmp_core.dcc.ac.uk" }
6939
config.action_mailer.default_url_options = { host: ENV["HOST_URL"] }
7040

71-
7241
Rails.application.config.assets.configure do |env|
7342
env.export_concurrent = false
7443
end
7544

76-
#_dmproadmap.rb settings
7745
# --------------------- #
7846
# ORGANISATION SETTINGS #
7947
# --------------------- #
8048

81-
# Your organisation name, used in various places throught the application
8249
config.x.organisation.name = ENV['ORGANISATION_NAME']
83-
# Your organisation's abbreviation
50+
8451
config.x.organisation.abbreviation = ENV['ORGANISATION_ABBREVIATION']
85-
# Your organisation's homepage, used in some of the public facing pages
52+
8653
config.x.organisation.url = ENV['ORGANISATION_URL']
87-
# Your organisation's legal (official) name - used in the copyright portion of the footer
54+
8855
config.x.organisation.copywrite_name = ENV['ORGANISATION_COPYWRITE_NAME']
89-
# This email is used as the 'from' address for emails generated by the application
56+
9057
config.x.organisation.email = ENV['ORGANISATION_EMAIL']
91-
# This email is used as the 'from' address for the feedback_complete email to users
58+
9259
config.x.organisation.do_not_reply_email = ENV['ORGANISATION_DO_NOT_REPLY_EMAIL']
93-
# This email is used in email communications
60+
9461
config.x.organisation.helpdesk_email = ENV['ORGANISATION_HELPDESK_EMAIL']
95-
# Your organisation's telephone number - used on the contact us page
62+
9663
config.x.organisation.telephone = ENV['ORGANISATION_TELEPHONE']
97-
# Your organisation's address - used on the contact us page
64+
9865
# rubocop:disable Naming/VariableNumber
9966
config.x.organisation.address = {
10067
line_1: ENV['ORGANISATION_ADDRESS_LINE_1'],
@@ -105,19 +72,8 @@ class Application < Rails::Application
10572
}
10673
# rubocop:enable Naming/VariableNumber
10774

108-
# The Google maps link to your organisation's location - used to display the
109-
# Google map on the contact us page.
110-
# To find your organisation's Google maps URL, open maps.google.com, search for
111-
# your orgnaisation and then click the menu link to the left of the search box,
112-
# once the menu opens, click the 'share or embed' link and the 'embed' tab on
113-
# the dialog window that opens. DO NOT place the entire <iframe> tag below, just
114-
# the address!
11575
config.x.organisation.google_maps_link = ENV['ORGANISATION_GOOGLE_MAPS_LINK']
11676

117-
# Uncomment the following line if you want to redirect your users to an
118-
# organisational contact/help page instead of using the built-in contact_us form
119-
# config.x.organisation.contact_us_url = "https://example.org/contact
120-
12177
# -------------------- #
12278
# APPLICATION SETTINGS #
12379
# -------------------- #

0 commit comments

Comments
 (0)