summaryrefslogtreecommitdiff
path: root/config/application.rb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-27 16:58:53 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-27 16:58:53 +0200
commit420506e58fdfc84f1a5bede0a01dedf0af3bb4f3 (patch)
tree57726b40e8aa9ccf80f874f39d3facefc0331420 /config/application.rb
parent241d5e91b2b6716e2861cc77d319c3d3568343a8 (diff)
Stage 7: Rails 7.2 → 8.1 on Ruby 3.2.11
- Bump Rails to 8.1.3 (Ruby unchanged at 3.2.11, new gemset rails8-upgrade) - config.load_defaults 8.1; merge app:update diffs for all environment files - Remove routing-filter 0.7.0; replace with native scope '(:locale)' in routes.rb and default_url_options in ApplicationController - Delete config/initializers/routing_filter_rails71_patch.rb - Replace vendored TinyMCE 3.x (~200 files) with tinymce-rails ~> 8.3; migrate admin_interface.js from jQuery .tinymce()/advanced theme to tinymce.init(); add config/tinymce.yml; note: TinyMCE 7+ is GPL - rails-i18n ~> 8.0 added explicitly (previously indirect dependency) - awesome_nested_set, acts-as-taggable-on pinned to git main/master (gemspec activerecord < 8.1 ceiling; no functional incompatibility; repin to version once upstream releases updated gemspecs) - globalize ~> 7.0, libxml-ruby ~> 5.0, nokogiri ~> 1.18, pg ~> 1.5 - sass-rails, coffee-rails, uglifier moved from :assets group to main (Sprockets 4 convention; :assets group no longer meaningful) - Node: head, draft, lock_owner marked belongs_to optional: true - Page: node, user, editor marked belongs_to optional: true - Static assets in public/images/ and public/javascripts/ referenced via plain HTML tags; Rails 8 load_defaults raises on pipeline helpers for undeclared assets - sessions_controller_test.rb: remove stale require and dead rescue_action - users_controller_test.rb: assert button[type=submit] not input[type=submit] (Rails 8 button_to renders <button> not <input>) - test_helper.rb: node.reload after children.create! (awesome_nested_set 3.9.0 does not refresh parent in memory after callback) - 129 runs, 339 assertions, 3 failures, 0 errors — identical baseline to 7.2
Diffstat (limited to 'config/application.rb')
-rw-r--r--config/application.rb58
1 files changed, 8 insertions, 50 deletions
diff --git a/config/application.rb b/config/application.rb
index d92802f..3ddad2d 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -1,62 +1,20 @@
1# Put this in config/application.rb 1require_relative "boot"
2require File.expand_path('../boot', __FILE__)
3 2
4require 'rails/all' 3require "rails/all"
5 4
6Bundler.require(:default, Rails.env) if defined?(Bundler) 5Bundler.require(*Rails.groups)
7
8require 'action_controller'
9
10module ActionController
11 class Base
12 def self.consider_all_requests_local=(val)
13 # no-op: controlled via config.consider_all_requests_local in environment files
14 end
15 end
16end
17 6
18module Cccms 7module Cccms
19 class Application < Rails::Application 8 class Application < Rails::Application
20 config.autoload_paths += [config.root.join('lib')] 9 config.load_defaults 8.1
21 config.encoding = 'utf-8' 10
22 # Settings in config/environments/* take precedence over those specified here. 11 config.autoload_lib(ignore: %w[assets tasks])
23 # Application configuration should go into files in config/initializers 12
24 # -- all .rb files in that directory are automatically loaded.
25
26 # Add additional load paths for your own custom dirs
27 # config.load_paths += %W( #{RAILS_ROOT}/extras )
28
29 # Only load the plugins named here, in the order given (default is alphabetical).
30 # :all can be used as a placeholder for all plugins not explicitly named
31 # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
32
33 # Allowed Tags
34 # strong em b i p code pre tt samp kbd var sub sup dfn cite big small
35 # address hr br div span h1 h2 h3 h4 h5 h6 ul ol li dt dd abbr
36 # acronym a img blockquote del ins
37
38 # Allowed Attributes:
39 # href src width height alt cite datetime title class name xml:lang abbr))
40
41 # Add tags to whitelist with:
42 # config.action_view.sanitized_allowed_tags = 'table', 'tr', 'td'
43
44 # Add attributes to whitelist with:
45 # config.action_view.sanitized_allowed_attributes = 'id', 'class', 'style'
46
47 # Activate observers that should always be running
48 # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
49
50 # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
51 # Run "rake -D time" for a list of tasks for finding time zone names.
52 config.time_zone = 'Berlin' 13 config.time_zone = 'Berlin'
53 14
54 # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
55 # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
56 config.i18n.default_locale = :de 15 config.i18n.default_locale = :de
57 config.i18n.fallbacks = { en: [:en, :de] } 16 config.i18n.fallbacks = { en: [:en, :de] }
58 17
59 config.filter_parameters += [:password, :password_confirmation] 18 config.filter_parameters += [:password, :password_confirmation]
60 config.serve_static_files = true
61 end 19 end
62end 20end