]> git.openstreetmap.org Git - rails.git/blob - config/initializers/new_framework_defaults_7_2.rb
Update to rails 7.2.0
[rails.git] / config / initializers / new_framework_defaults_7_2.rb
1 # Be sure to restart your server when you modify this file.
2 #
3 # This file eases your Rails 7.2 framework defaults upgrade.
4 #
5 # Uncomment each configuration one by one to switch to the new default.
6 # Once your application is ready to run with all new defaults, you can remove
7 # this file and set the `config.load_defaults` to `7.2`.
8 #
9 # Read the Guide for Upgrading Ruby on Rails for more info on each option.
10 # https://guides.rubyonrails.org/upgrading_ruby_on_rails.html
11
12 ###
13 # Controls whether Active Job's `#perform_later` and similar methods automatically defer
14 # the job queuing to after the current Active Record transaction is committed.
15 #
16 # Example:
17 #   Topic.transaction do
18 #     topic = Topic.create(...)
19 #     NewTopicNotificationJob.perform_later(topic)
20 #   end
21 #
22 # In this example, if the configuration is set to `:never`, the job will
23 # be enqueued immediately, even though the `Topic` hasn't been committed yet.
24 # Because of this, if the job is picked up almost immediately, or if the
25 # transaction doesn't succeed for some reason, the job will fail to find this
26 # topic in the database.
27 #
28 # If `enqueue_after_transaction_commit` is set to `:default`, the queue adapter
29 # will define the behaviour.
30 #
31 # Note: Active Job backends can disable this feature. This is generally done by
32 # backends that use the same database as Active Record as a queue, hence they
33 # don't need this feature.
34 #++
35 # Rails.application.config.active_job.enqueue_after_transaction_commit = :default
36
37 ###
38 # Adds image/webp to the list of content types Active Storage considers as an image
39 # Prevents automatic conversion to a fallback PNG, and assumes clients support WebP, as they support gif, jpeg, and png.
40 # This is possible due to broad browser support for WebP, but older browsers and email clients may still not support
41 # WebP. Requires imagemagick/libvips built with WebP support.
42 #++
43 # Rails.application.config.active_storage.web_image_content_types = %w[image/png image/jpeg image/gif image/webp]
44
45 ###
46 # Enable validation of migration timestamps. When set, an ActiveRecord::InvalidMigrationTimestampError
47 # will be raised if the timestamp prefix for a migration is more than a day ahead of the timestamp
48 # associated with the current time. This is done to prevent forward-dating of migration files, which can
49 # impact migration generation and other migration commands.
50 #
51 # Applications with existing timestamped migrations that do not adhere to the
52 # expected format can disable validation by setting this config to `false`.
53 #++
54 # Rails.application.config.active_record.validate_migration_timestamps = true
55
56 ###
57 # Controls whether the PostgresqlAdapter should decode dates automatically with manual queries.
58 #
59 # Example:
60 #   ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.select_value("select '2024-01-01'::date") #=> Date
61 #
62 # This query used to return a `String`.
63 #++
64 # Rails.application.config.active_record.postgresql_adapter_decode_dates = true
65
66 ###
67 # Enables YJIT as of Ruby 3.3, to bring sizeable performance improvements. If you are
68 # deploying to a memory constrained environment you may want to set this to `false`.
69 #++
70 # Rails.application.config.yjit = true