new_framework_defaults_6_1.rb 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. # Be sure to restart your server when you modify this file.
  3. #
  4. # This file contains migration options to ease your Rails 6.1 upgrade.
  5. #
  6. # Once upgraded flip defaults one by one to migrate to the new default.
  7. #
  8. # Read the Guide for Upgrading Ruby on Rails for more info on each option.
  9. # Support for inversing belongs_to -> has_many Active Record associations.
  10. # Rails.application.config.active_record.has_many_inversing = true
  11. # Track Active Storage variants in the database.
  12. # Rails.application.config.active_storage.track_variants = true
  13. # Apply random variation to the delay when retrying failed jobs.
  14. # Rails.application.config.active_job.retry_jitter = 0.15
  15. # Stop executing `after_enqueue`/`after_perform` callbacks if
  16. # `before_enqueue`/`before_perform` respectively halts with `throw :abort`.
  17. Rails.application.config.active_job.skip_after_callbacks_if_terminated = true
  18. # The method recommended above by Rails does not seem to be effective to silence the deprecation warning.
  19. # Override the corresponding ActiveJob class attribute to make it work.
  20. Rails.application.reloader.to_prepare do
  21. 'ApplicationJob'.constantize
  22. class ApplicationJob # rubocop:disable Lint/ConstantDefinitionInBlock
  23. @@skip_after_callbacks_if_terminated = true # rubocop:disable Style/ClassVars
  24. end
  25. end
  26. # Specify cookies SameSite protection level: either :none, :lax, or :strict.
  27. #
  28. # This change is not backwards compatible with earlier Rails versions.
  29. # It's best enabled when your entire app is migrated and stable on 6.1.
  30. # Rails.application.config.action_dispatch.cookies_same_site_protection = :lax
  31. # Generate CSRF tokens that are encoded in URL-safe Base64.
  32. #
  33. # This change is not backwards compatible with earlier Rails versions.
  34. # It's best enabled when your entire app is migrated and stable on 6.1.
  35. # Rails.application.config.action_controller.urlsafe_csrf_tokens = true
  36. # Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an
  37. # UTC offset or a UTC time.
  38. # ActiveSupport.utc_to_local_returns_utc_offset_times = true
  39. # Change the default HTTP status code to `308` when redirecting non-GET/HEAD
  40. # requests to HTTPS in `ActionDispatch::SSL` middleware.
  41. # Rails.application.config.action_dispatch.ssl_default_redirect_status = 308
  42. # Use new connection handling API. For most applications this won't have any
  43. # effect. For applications using multiple databases, this new API provides
  44. # support for granular connection swapping.
  45. # Rails.application.config.active_record.legacy_connection_handling = false
  46. # Make `form_with` generate non-remote forms by default.
  47. # Rails.application.config.action_view.form_with_generates_remote_forms = false
  48. # Set the default queue name for the analysis job to the queue adapter default.
  49. # Rails.application.config.active_storage.queues.analysis = nil
  50. # Set the default queue name for the purge job to the queue adapter default.
  51. # Rails.application.config.active_storage.queues.purge = nil
  52. # Set the default queue name for the incineration job to the queue adapter default.
  53. # Rails.application.config.action_mailbox.queues.incineration = nil
  54. # Set the default queue name for the routing job to the queue adapter default.
  55. # Rails.application.config.action_mailbox.queues.routing = nil
  56. # Set the default queue name for the mail deliver job to the queue adapter default.
  57. # Rails.application.config.action_mailer.deliver_later_queue_name = nil
  58. # Generate a `Link` header that gives a hint to modern browsers about
  59. # preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`.
  60. # Rails.application.config.action_view.preload_links_header = true