diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-26 05:19:28 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-26 05:19:28 +0200 |
| commit | a1ddc25da0d2aa79a4d9216ef7792f26233bd38e (patch) | |
| tree | 4d53e6ccb631e588c9e1d25c7a2dc5ef2ef44135 /config | |
| parent | fa0ccc43010297c0c10e3075095c0a9171989498 (diff) | |
Stage 5 fixes: RouteWithParams removal, Globalize fallbacks, search stub, to_s(:db) → to_fs(:db), LockedByAnotherUser autoload, test environment config
- Remove safe_path helper and content_path shim from link_helper.rb
- Update all safe_path call sites in views to use named route helpers directly
- Fix Globalize fallbacks via config.i18n.fallbacks in application.rb, remove i18n initializer
- Stub Node.search returning none (search disabled pending PostgreSQL upgrade)
- Replace to_s(:db) with to_fs(:db) in node.rb, nodes_helper.rb, link_helper.rb, admin view
- Move LockedByAnotherUser to app/models/locked_by_another_user.rb for Zeitwerk autoloading
- Fix config/environments/test.rb: config.assets removed, cache_classes → enable_reloading,
test_order removed, minitest pinned to ~> 5.25
- Fix config/environments/development.rb: cache_classes → enable_reloading
- Park search vector migration in doc/ pending PostgreSQL and plpgsql availability
Diffstat (limited to 'config')
| -rw-r--r-- | config/application.rb | 1 | ||||
| -rw-r--r-- | config/environments/development.rb | 2 | ||||
| -rw-r--r-- | config/environments/test.rb | 4 | ||||
| -rw-r--r-- | config/initializers/i18n.rb | 3 | ||||
| -rw-r--r-- | config/initializers/will_paginate_patch.rb | 13 |
5 files changed, 3 insertions, 20 deletions
diff --git a/config/application.rb b/config/application.rb index 1a7f32b..d92802f 100644 --- a/config/application.rb +++ b/config/application.rb | |||
| @@ -54,6 +54,7 @@ module Cccms | |||
| 54 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. | 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}')] | 55 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')] |
| 56 | config.i18n.default_locale = :de | 56 | config.i18n.default_locale = :de |
| 57 | config.i18n.fallbacks = { en: [:en, :de] } | ||
| 57 | 58 | ||
| 58 | config.filter_parameters += [:password, :password_confirmation] | 59 | config.filter_parameters += [:password, :password_confirmation] |
| 59 | config.serve_static_files = true | 60 | config.serve_static_files = true |
diff --git a/config/environments/development.rb b/config/environments/development.rb index 8e2e7ef..43a6846 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb | |||
| @@ -4,7 +4,7 @@ Cccms::Application.configure do | |||
| 4 | # In the development environment your application's code is reloaded on | 4 | # In the development environment your application's code is reloaded on |
| 5 | # every request. This slows down response time but is perfect for development | 5 | # every request. This slows down response time but is perfect for development |
| 6 | # since you don't have to restart the webserver when you make code changes. | 6 | # since you don't have to restart the webserver when you make code changes. |
| 7 | config.cache_classes = false | 7 | config.enable_reloading = true |
| 8 | 8 | ||
| 9 | # Log error messages when you accidentally call methods on nil. | 9 | # Log error messages when you accidentally call methods on nil. |
| 10 | 10 | ||
diff --git a/config/environments/test.rb b/config/environments/test.rb index a23c6d4..48aafe8 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | Cccms::Application.configure do | 1 | Cccms::Application.configure do |
| 2 | 2 | ||
| 3 | config.cache_classes = true | 3 | config.enable_reloading = false |
| 4 | 4 | ||
| 5 | config.action_controller.consider_all_requests_local = true | 5 | config.action_controller.consider_all_requests_local = true |
| 6 | config.action_controller.perform_caching = false | 6 | config.action_controller.perform_caching = false |
| @@ -10,10 +10,8 @@ Cccms::Application.configure do | |||
| 10 | config.action_mailer.delivery_method = :test | 10 | config.action_mailer.delivery_method = :test |
| 11 | 11 | ||
| 12 | config.active_support.deprecation = :log | 12 | config.active_support.deprecation = :log |
| 13 | config.active_support.test_order = :sorted | ||
| 14 | 13 | ||
| 15 | config.eager_load = false | 14 | config.eager_load = false |
| 16 | config.public_file_server.enabled = true | 15 | config.public_file_server.enabled = true |
| 17 | config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' } | 16 | config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' } |
| 18 | config.assets.compile = true | ||
| 19 | end | 17 | end |
diff --git a/config/initializers/i18n.rb b/config/initializers/i18n.rb deleted file mode 100644 index 0190f63..0000000 --- a/config/initializers/i18n.rb +++ /dev/null | |||
| @@ -1,3 +0,0 @@ | |||
| 1 | require "i18n/backend/fallbacks" | ||
| 2 | I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks) | ||
| 3 | I18n.fallbacks.map "en" => ["de"] | ||
diff --git a/config/initializers/will_paginate_patch.rb b/config/initializers/will_paginate_patch.rb deleted file mode 100644 index d03c882..0000000 --- a/config/initializers/will_paginate_patch.rb +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | require 'will_paginate/view_helpers/action_view' | ||
| 2 | |||
| 3 | WillPaginate::ActionView::LinkRenderer.class_eval do | ||
| 4 | def url(page) | ||
| 5 | path = @template.request.path | ||
| 6 | page_param = WillPaginate::PageNumber(page) | ||
| 7 | if page_param == 1 | ||
| 8 | path | ||
| 9 | else | ||
| 10 | "#{path}?#{@options[:param_name]}=#{page}" | ||
| 11 | end | ||
| 12 | end | ||
| 13 | end | ||
