Enable some Rails 6.1 framework default part2 (#17855)
* Enable form_with_generates_remote_forms and deliver_later_queue_name * Change form_with_generates_remote_forms to true * Move config to application.rb * Enable urlsafe_csrf_tokens * Update comment
This commit is contained in:
parent
6c9a09c344
commit
a87f70048c
2 changed files with 5 additions and 5 deletions
|
|
@ -47,6 +47,9 @@ module PracticalDeveloper
|
|||
## Rails 6.1
|
||||
# This replaces the old config.active_support.use_sha1_digests from Rails 5.2
|
||||
config.active_support.hash_digest_class = ::Digest::MD5 # New default is ::Digest::SHA1
|
||||
|
||||
# Make `form_with` generate non-remote forms by default. We want this to be true as it was the default in 5.2
|
||||
config.action_view.form_with_generates_remote_forms = true
|
||||
### END FRAMEWORK DEFAULT OVERIDES
|
||||
|
||||
# Disable auto adding of default load paths to $LOAD_PATH
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ Rails.application.config.active_job.skip_after_callbacks_if_terminated = true
|
|||
#
|
||||
# This change is not backwards compatible with earlier Rails versions.
|
||||
# It's best enabled when your entire app is migrated and stable on 6.1.
|
||||
# Rails.application.config.action_controller.urlsafe_csrf_tokens = true
|
||||
Rails.application.config.action_controller.urlsafe_csrf_tokens = true
|
||||
|
||||
# Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an
|
||||
# UTC offset or a UTC time.
|
||||
|
|
@ -41,11 +41,8 @@ Rails.application.config.action_dispatch.ssl_default_redirect_status = 308
|
|||
# support for granular connection swapping.
|
||||
Rails.application.config.active_record.legacy_connection_handling = false
|
||||
|
||||
# Make `form_with` generate non-remote forms by default.
|
||||
# Rails.application.config.action_view.form_with_generates_remote_forms = false
|
||||
|
||||
# Set the default queue name for the mail deliver job to the queue adapter default.
|
||||
# Rails.application.config.action_mailer.deliver_later_queue_name = nil
|
||||
Rails.application.config.action_mailer.deliver_later_queue_name = nil
|
||||
|
||||
# Generate a `Link` header that gives a hint to modern browsers about
|
||||
# preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue