Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Move common config in application.rb

Oliver Güntherc71742fa01bd
diff --git a/config/application.rb b/config/application.rb
index b88fea55c3f..bf8813d30e5 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -121,6 +121,9 @@ module OpenProject
# Fall back to default locale
config.i18n.fallbacks = true
+ # Enable serialization of types [Symbol, Date, Time]
+ config.active_record.yaml_column_permitted_classes = [Symbol, Date, Time, ActiveSupport::HashWithIndifferentAccess]
+
# Activate being able to specify the format in which full_message works.
# Doing this, it is e.g. possible to avoid having the format of '%{attribute} %{message}' which
# will always prepend the attribute name to the error message.
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 53ed9ef2cac..49ef1e064f2 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -67,9 +67,6 @@ OpenProject::Application.configure do
# Highlight code that triggered database queries in logs.
config.active_record.verbose_query_logs = true
- # Enable serialization of types [Symbol, Date, Time]
- config.active_record.yaml_column_permitted_classes = [Symbol, Date, Time, ActiveSupport::HashWithIndifferentAccess]
-
# Disable compression and asset digests, but disable debug
config.assets.debug = false
config.assets.digest = false
diff --git a/config/environments/production.rb b/config/environments/production.rb
index f1f126ef1f9..b34f151c090 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -119,9 +119,6 @@ OpenProject::Application.configure do
config.active_record.dump_schema_after_migration = false
- # Enable serialization of types [Symbol, Date, Time]
- config.active_record.yaml_column_permitted_classes = [Symbol, Date, Time, ActiveSupport::HashWithIndifferentAccess]
-
if OpenProject::Configuration.enable_internal_assets_server?
config.public_file_server.enabled = true
config.public_file_server.headers = {
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 6b423b25167..2d9a5ef27f6 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -53,9 +53,6 @@ OpenProject::Application.configure do
config.consider_all_requests_local = true
config.action_controller.perform_caching = true
- # Enable serialization of types [Symbol, Date, Time]
- config.active_record.yaml_column_permitted_classes = [Symbol, Date, Time, ActiveSupport::HashWithIndifferentAccess]
-
# Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false