|
22 | 22 | # Apache or NGINX already handles this. |
23 | 23 | config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? |
24 | 24 |
|
25 | | - # Compress JavaScripts and CSS. |
26 | | - config.assets.js_compressor = :uglifier |
| 25 | + # Compress CSS using a preprocessor. |
27 | 26 | # config.assets.css_compressor = :sass |
28 | 27 |
|
29 | 28 | # Do not fallback to assets pipeline if a precompiled asset is missed. |
30 | 29 | config.assets.compile = false |
31 | 30 |
|
32 | | - # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb |
33 | | - |
34 | 31 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. |
35 | 32 | # config.action_controller.asset_host = 'http://assets.example.com' |
36 | 33 |
|
37 | 34 | # Specifies the header that your server uses for sending files. |
38 | 35 | # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache |
39 | 36 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX |
40 | 37 |
|
41 | | - # Store uploaded files on the local file system (see config/storage.yml for options) |
42 | | - # config.active_storage.service = :local |
43 | | - |
44 | 38 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. |
45 | 39 | # config.force_ssl = true |
46 | 40 |
|
|
54 | 48 | # Use a different cache store in production. |
55 | 49 | # config.cache_store = :mem_cache_store |
56 | 50 |
|
57 | | - # Use a real queuing backend for Active Job (and separate queues per environment) |
| 51 | + # Use a real queuing backend for Active Job (and separate queues per environment). |
58 | 52 | # config.active_job.queue_adapter = :resque |
59 | | - # config.active_job.queue_name_prefix = "dummy_#{Rails.env}" |
| 53 | + # config.active_job.queue_name_prefix = "dummy_production" |
60 | 54 |
|
61 | 55 | config.action_mailer.perform_caching = false |
62 | 56 |
|
|
86 | 80 |
|
87 | 81 | # Do not dump schema after migrations. |
88 | 82 | config.active_record.dump_schema_after_migration = false |
| 83 | + |
| 84 | + # Inserts middleware to perform automatic connection switching. |
| 85 | + # The `database_selector` hash is used to pass options to the DatabaseSelector |
| 86 | + # middleware. The `delay` is used to determine how long to wait after a write |
| 87 | + # to send a subsequent read to the primary. |
| 88 | + # |
| 89 | + # The `database_resolver` class is used by the middleware to determine which |
| 90 | + # database is appropriate to use based on the time delay. |
| 91 | + # |
| 92 | + # The `database_resolver_context` class is used by the middleware to set |
| 93 | + # timestamps for the last write to the primary. The resolver uses the context |
| 94 | + # class timestamps to determine how long to wait before reading from the |
| 95 | + # replica. |
| 96 | + # |
| 97 | + # By default Rails will store a last write timestamp in the session. The |
| 98 | + # DatabaseSelector middleware is designed as such you can define your own |
| 99 | + # strategy for connection switching and pass that into the middleware through |
| 100 | + # these configuration options. |
| 101 | + # config.active_record.database_selector = { delay: 2.seconds } |
| 102 | + # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver |
| 103 | + # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session |
89 | 104 | end |
0 commit comments