Skip to content

Commit

Permalink
Activate new rails 6 defaults where able.
Browse files Browse the repository at this point in the history
  • Loading branch information
CraigJZ committed Dec 2, 2019
1 parent 88f3b9a commit a8f1e60
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
4 changes: 4 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,9 @@ class Application < Rails::Application
ENV[key.to_s] = value
end if File.exist?(env_file)
end

# remove after changing load_defaults to 6.0
# Uncomment when ready to test out zeitwerk loader
# config.autoloader = :zeitwerk
end
end
14 changes: 7 additions & 7 deletions config/initializers/new_framework_defaults_6_0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Read the Guide for Upgrading Ruby on Rails for more info on each option.

# Don't force requests from old versions of IE to be UTF-8 encoded.
# Rails.application.config.action_view.default_enforce_utf8 = false
Rails.application.config.action_view.default_enforce_utf8 = false

# Embed purpose and expiry metadata inside signed and encrypted
# cookies for increased security.
Expand All @@ -17,18 +17,18 @@
# Rails.application.config.action_dispatch.use_cookies_with_metadata = true

# Change the return value of `ActionDispatch::Response#content_type` to Content-Type header without modification.
# Rails.application.config.action_dispatch.return_only_media_type_on_content_type = false
Rails.application.config.action_dispatch.return_only_media_type_on_content_type = false

# Return false instead of self when enqueuing is aborted from a callback.
# Rails.application.config.active_job.return_false_on_aborted_enqueue = true
Rails.application.config.active_job.return_false_on_aborted_enqueue = true

# Send Active Storage analysis and purge jobs to dedicated queues.
# Rails.application.config.active_storage.queues.analysis = :active_storage_analysis
# Rails.application.config.active_storage.queues.purge = :active_storage_purge
Rails.application.config.active_storage.queues.analysis = :active_storage_analysis
Rails.application.config.active_storage.queues.purge = :active_storage_purge

# When assigning to a collection of attachments declared via `has_many_attached`, replace existing
# attachments instead of appending. Use #attach to add new attachments without replacing existing ones.
# Rails.application.config.active_storage.replace_on_assign_to_many = true
Rails.application.config.active_storage.replace_on_assign_to_many = true

# Use ActionMailer::MailDeliveryJob for sending parameterized and normal mail.
#
Expand All @@ -42,4 +42,4 @@
# Enable the same cache key to be reused when the object being cached of type
# `ActiveRecord::Relation` changes by moving the volatile information (max updated at and count)
# of the relation's cache key into the cache version to support recycling cache key.
# Rails.application.config.active_record.collection_cache_versioning = true
Rails.application.config.active_record.collection_cache_versioning = true
3 changes: 0 additions & 3 deletions test/mailers/previews/comments_mailer_preview.rb

This file was deleted.

2 changes: 2 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
Capybara.server = :puma, { Silent: true }

class ActiveSupport::TestCase
# Run tests in parallel with specified workers
# parallelize(workers: :number_of_processors)
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
fixtures :all

Expand Down

0 comments on commit a8f1e60

Please sign in to comment.