Skip to content

Commit

Permalink
Upgrade defaults for Rails 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ddippolito committed Nov 20, 2024
1 parent 3988f09 commit 532e84e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@

module TeachingVacancies
class Application < Rails::Application
config.load_defaults 7.0
config.load_defaults 7.2

config.add_autoload_paths_to_load_path = false

config.time_zone = "Europe/London"

# Enables YJIT as of Ruby 3.3, to bring sizeable performance improvements.
# If you are deploying to a memory constrained environment you may want to set this to `false`.
config.yjit = true

# Automatically add `id: uuid` on any generated migrations
config.generators do |g|
g.orm :active_record, primary_key_type: :uuid
Expand All @@ -51,6 +55,12 @@ class Application < Rails::Application
# instances to save changes to the same database row within a transaction.
config.active_record.run_commit_callbacks_on_first_saved_instances_in_transaction = false

# Enable validation of migration timestamps globally
config.active_record.validate_migration_timestamps = true

# Enable automatic decoding of PostgreSQL DATE columns for manual queries
config.active_record.postgresql_adapter_decode_dates = true

# Settings in config/environments/* take precedence over those
# specified here.
# Application configuration should go into files in config/initializers
Expand All @@ -61,6 +71,10 @@ class Application < Rails::Application

config.active_job.queue_adapter = :sidekiq

# Controls whether Active Job's `#perform_later` and similar methods automatically defer
# the job queuing to after the current Active Record transaction is committed.
config.active_job.enqueue_after_transaction_commit = :default

config.action_mailer.delivery_method = :notify
config.action_mailer.deliver_later_queue_name = :high
config.action_mailer.notify_settings = {
Expand All @@ -70,6 +84,7 @@ class Application < Rails::Application

config.active_storage.routes_prefix = "/attachments"
config.active_storage.resolve_model_to_route = :rails_storage_proxy
config.active_storage.web_image_content_types = %w[image/png image/jpeg image/gif image/webp]

# Specify the default serializer used by `MessageEncryptor` and `MessageVerifier`
# instances.
Expand Down

0 comments on commit 532e84e

Please sign in to comment.