railties 6.0.0.beta3 → 6.0.2.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +139 -8
- data/RDOC_MAIN.rdoc +3 -4
- data/README.rdoc +1 -1
- data/lib/rails/api/task.rb +1 -0
- data/lib/rails/application.rb +6 -3
- data/lib/rails/application/bootstrap.rb +2 -10
- data/lib/rails/application/configuration.rb +45 -1
- data/lib/rails/application/default_middleware_stack.rb +1 -0
- data/lib/rails/application/dummy_erb_compiler.rb +18 -0
- data/lib/rails/application/finisher.rb +44 -1
- data/lib/rails/autoloaders.rb +14 -2
- data/lib/rails/command/base.rb +4 -0
- data/lib/rails/command/environment_argument.rb +7 -4
- data/lib/rails/commands/console/console_command.rb +6 -0
- data/lib/rails/commands/credentials/USAGE +1 -1
- data/lib/rails/commands/credentials/credentials_command.rb +17 -3
- data/lib/rails/commands/dbconsole/dbconsole_command.rb +19 -7
- data/lib/rails/commands/dev/dev_command.rb +4 -2
- data/lib/rails/commands/encrypted/USAGE +28 -0
- data/lib/rails/commands/encrypted/encrypted_command.rb +1 -0
- data/lib/rails/commands/initializers/initializers_command.rb +7 -0
- data/lib/rails/commands/notes/notes_command.rb +1 -1
- data/lib/rails/commands/runner/runner_command.rb +7 -3
- data/lib/rails/commands/server/server_command.rb +8 -6
- data/lib/rails/engine.rb +35 -36
- data/lib/rails/engine/configuration.rb +3 -2
- data/lib/rails/gem_version.rb +2 -2
- data/lib/rails/generators.rb +2 -0
- data/lib/rails/generators/app_base.rb +5 -5
- data/lib/rails/generators/app_name.rb +2 -2
- data/lib/rails/generators/base.rb +4 -0
- data/lib/rails/generators/database.rb +1 -1
- data/lib/rails/generators/erb/scaffold/templates/_form.html.erb.tt +6 -3
- data/lib/rails/generators/erb/scaffold/templates/show.html.erb.tt +8 -0
- data/lib/rails/generators/generated_attribute.rb +36 -10
- data/lib/rails/generators/named_base.rb +1 -1
- data/lib/rails/generators/rails/app/app_generator.rb +1 -0
- data/lib/rails/generators/rails/app/templates/Gemfile.tt +4 -4
- data/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt +8 -0
- data/lib/rails/generators/rails/app/templates/bin/setup.tt +3 -2
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml.tt +1 -1
- data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +1 -1
- data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +2 -0
- data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +2 -0
- data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +10 -4
- data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt +3 -0
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt +12 -0
- data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +3 -0
- data/lib/rails/generators/rails/app/templates/gitignore.tt +1 -0
- data/lib/rails/generators/rails/app/templates/package.json.tt +3 -3
- data/lib/rails/generators/rails/app/templates/public/robots.txt +1 -1
- data/lib/rails/generators/rails/app/templates/ruby-version.tt +1 -1
- data/lib/rails/generators/rails/assets/assets_generator.rb +7 -0
- data/lib/rails/generators/rails/db/system/change/change_generator.rb +12 -2
- data/lib/rails/generators/rails/plugin/plugin_generator.rb +0 -15
- data/lib/rails/generators/rails/plugin/templates/gitignore.tt +1 -0
- data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +14 -0
- data/lib/rails/generators/rails/scaffold_controller/templates/api_controller.rb.tt +1 -1
- data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb.tt +1 -1
- data/lib/rails/generators/test_unit/model/templates/fixtures.yml.tt +2 -2
- data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +7 -2
- data/lib/rails/info.rb +1 -1
- data/lib/rails/mailers_controller.rb +6 -3
- data/lib/rails/source_annotation_extractor.rb +19 -6
- data/lib/rails/tasks.rb +1 -0
- data/lib/rails/tasks/zeitwerk.rake +66 -0
- metadata +18 -13
- data/lib/rails/generators/rails/app/templates/bin/update.tt +0 -33
@@ -6,7 +6,7 @@ module Rails
|
|
6
6
|
class Engine
|
7
7
|
class Configuration < ::Rails::Railtie::Configuration
|
8
8
|
attr_reader :root
|
9
|
-
attr_accessor :middleware
|
9
|
+
attr_accessor :middleware, :javascript_path
|
10
10
|
attr_writer :eager_load_paths, :autoload_once_paths, :autoload_paths
|
11
11
|
|
12
12
|
def initialize(root = nil)
|
@@ -14,6 +14,7 @@ module Rails
|
|
14
14
|
@root = root
|
15
15
|
@generators = app_generators.dup
|
16
16
|
@middleware = Rails::Configuration::MiddlewareStackProxy.new
|
17
|
+
@javascript_path = "javascript"
|
17
18
|
end
|
18
19
|
|
19
20
|
# Holds generators configuration:
|
@@ -40,7 +41,7 @@ module Rails
|
|
40
41
|
|
41
42
|
paths.add "app", eager_load: true,
|
42
43
|
glob: "{*,*/concerns}",
|
43
|
-
exclude:
|
44
|
+
exclude: ["assets", javascript_path]
|
44
45
|
paths.add "app/assets", glob: "*"
|
45
46
|
paths.add "app/controllers", eager_load: true
|
46
47
|
paths.add "app/channels", eager_load: true, glob: "**/*_channel.rb"
|
data/lib/rails/gem_version.rb
CHANGED
data/lib/rails/generators.rb
CHANGED
@@ -192,7 +192,7 @@ module Rails
|
|
192
192
|
def web_server_gemfile_entry # :doc:
|
193
193
|
return [] if options[:skip_puma]
|
194
194
|
comment = "Use Puma as the app server"
|
195
|
-
GemfileEntry.new("puma", "~>
|
195
|
+
GemfileEntry.new("puma", "~> 4.1", comment)
|
196
196
|
end
|
197
197
|
|
198
198
|
def include_all_railties? # :doc:
|
@@ -282,7 +282,7 @@ module Rails
|
|
282
282
|
]
|
283
283
|
elsif options.edge?
|
284
284
|
[
|
285
|
-
GemfileEntry.github("rails", "rails/rails")
|
285
|
+
GemfileEntry.github("rails", "rails/rails", "6-0-stable")
|
286
286
|
]
|
287
287
|
else
|
288
288
|
[GemfileEntry.version("rails",
|
@@ -307,7 +307,7 @@ module Rails
|
|
307
307
|
def assets_gemfile_entry
|
308
308
|
return [] if options[:skip_sprockets]
|
309
309
|
|
310
|
-
GemfileEntry.version("sass-rails", "
|
310
|
+
GemfileEntry.version("sass-rails", ">= 6", "Use SCSS for stylesheets")
|
311
311
|
end
|
312
312
|
|
313
313
|
def webpacker_gemfile_entry
|
@@ -316,13 +316,13 @@ module Rails
|
|
316
316
|
if options.dev? || options.edge?
|
317
317
|
GemfileEntry.github "webpacker", "rails/webpacker", nil, "Use development version of Webpacker"
|
318
318
|
else
|
319
|
-
GemfileEntry.version "webpacker", "
|
319
|
+
GemfileEntry.version "webpacker", "~> 4.0", "Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker"
|
320
320
|
end
|
321
321
|
end
|
322
322
|
|
323
323
|
def jbuilder_gemfile_entry
|
324
324
|
comment = "Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder"
|
325
|
-
GemfileEntry.new "jbuilder", "~> 2.
|
325
|
+
GemfileEntry.new "jbuilder", "~> 2.7", comment, {}, options[:api]
|
326
326
|
end
|
327
327
|
|
328
328
|
def javascript_gemfile_entry
|
@@ -7,11 +7,11 @@ module Rails
|
|
7
7
|
|
8
8
|
private
|
9
9
|
def app_name
|
10
|
-
@app_name ||= original_app_name.tr("
|
10
|
+
@app_name ||= original_app_name.tr('\\', "").tr("-. ", "_")
|
11
11
|
end
|
12
12
|
|
13
13
|
def original_app_name
|
14
|
-
@original_app_name ||=
|
14
|
+
@original_app_name ||= defined_app_const_base? ? defined_app_name : File.basename(destination_root)
|
15
15
|
end
|
16
16
|
|
17
17
|
def defined_app_name
|
@@ -24,6 +24,10 @@ module Rails
|
|
24
24
|
add_runtime_options!
|
25
25
|
strict_args_position!
|
26
26
|
|
27
|
+
def self.exit_on_failure? # :nodoc:
|
28
|
+
false
|
29
|
+
end
|
30
|
+
|
27
31
|
# Returns the source root for this generator using default_source_root as default.
|
28
32
|
def self.source_root(path = nil)
|
29
33
|
@_source_root = path if path
|
@@ -15,7 +15,7 @@ module Rails
|
|
15
15
|
case database
|
16
16
|
when "mysql" then ["mysql2", [">= 0.4.4"]]
|
17
17
|
when "postgresql" then ["pg", [">= 0.18", "< 2.0"]]
|
18
|
-
when "sqlite3" then ["sqlite3", ["~> 1.
|
18
|
+
when "sqlite3" then ["sqlite3", ["~> 1.4"]]
|
19
19
|
when "oracle" then ["activerecord-oracle_enhanced-adapter", nil]
|
20
20
|
when "frontbase" then ["ruby-frontbase", nil]
|
21
21
|
when "sqlserver" then ["activerecord-sqlserver-adapter", nil]
|
@@ -4,9 +4,9 @@
|
|
4
4
|
<h2><%%= pluralize(<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
|
5
5
|
|
6
6
|
<ul>
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
<%% <%= singular_table_name %>.errors.full_messages.each do |message| %>
|
8
|
+
<li><%%= message %></li>
|
9
|
+
<%% end %>
|
10
10
|
</ul>
|
11
11
|
</div>
|
12
12
|
<%% end %>
|
@@ -21,6 +21,9 @@
|
|
21
21
|
<div class="field">
|
22
22
|
<%%= form.label :password_confirmation %>
|
23
23
|
<%%= form.password_field :password_confirmation %>
|
24
|
+
<% elsif attribute.attachments? -%>
|
25
|
+
<%%= form.label :<%= attribute.column_name %> %>
|
26
|
+
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true %>
|
24
27
|
<% else -%>
|
25
28
|
<%%= form.label :<%= attribute.column_name %> %>
|
26
29
|
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %> %>
|
@@ -3,7 +3,15 @@
|
|
3
3
|
<% attributes.reject(&:password_digest?).each do |attribute| -%>
|
4
4
|
<p>
|
5
5
|
<strong><%= attribute.human_name %>:</strong>
|
6
|
+
<% if attribute.attachment? -%>
|
7
|
+
<%%= link_to @<%= singular_table_name %>.<%= attribute.column_name %>.filename, @<%= singular_table_name %>.<%= attribute.column_name %> if @<%= singular_table_name %>.<%= attribute.column_name %>.attached? %>
|
8
|
+
<% elsif attribute.attachments? -%>
|
9
|
+
<%% @<%= singular_table_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_name %>| %>
|
10
|
+
<div><%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %> %></div>
|
11
|
+
<%% end %>
|
12
|
+
<% else -%>
|
6
13
|
<%%= @<%= singular_table_name %>.<%= attribute.column_name %> %>
|
14
|
+
<% end -%>
|
7
15
|
</p>
|
8
16
|
|
9
17
|
<% end -%>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "active_support/time"
|
4
|
+
require "active_support/deprecation"
|
4
5
|
|
5
6
|
module Rails
|
6
7
|
module Generators
|
@@ -51,6 +52,12 @@ module Rails
|
|
51
52
|
type = $1
|
52
53
|
provided_options = $2.split(/[,.-]/)
|
53
54
|
options = Hash[provided_options.map { |opt| [opt.to_sym, true] }]
|
55
|
+
|
56
|
+
if options[:required]
|
57
|
+
ActiveSupport::Deprecation.warn("Passing {required} option has no effect on the model generator. It will be removed in Rails 6.1.\n")
|
58
|
+
options.delete(:required)
|
59
|
+
end
|
60
|
+
|
54
61
|
return type, options
|
55
62
|
else
|
56
63
|
return type, {}
|
@@ -68,13 +75,15 @@ module Rails
|
|
68
75
|
|
69
76
|
def field_type
|
70
77
|
@field_type ||= case type
|
71
|
-
when :integer
|
72
|
-
when :float, :decimal
|
73
|
-
when :time
|
74
|
-
when :datetime, :timestamp
|
75
|
-
when :date
|
76
|
-
when :text
|
77
|
-
when :
|
78
|
+
when :integer then :number_field
|
79
|
+
when :float, :decimal then :text_field
|
80
|
+
when :time then :time_select
|
81
|
+
when :datetime, :timestamp then :datetime_select
|
82
|
+
when :date then :date_select
|
83
|
+
when :text then :text_area
|
84
|
+
when :rich_text then :rich_text_area
|
85
|
+
when :boolean then :check_box
|
86
|
+
when :attachment, :attachments then :file_field
|
78
87
|
else
|
79
88
|
:text_field
|
80
89
|
end
|
@@ -90,7 +99,9 @@ module Rails
|
|
90
99
|
when :string then name == "type" ? "" : "MyString"
|
91
100
|
when :text then "MyText"
|
92
101
|
when :boolean then false
|
93
|
-
when :references, :belongs_to
|
102
|
+
when :references, :belongs_to,
|
103
|
+
:attachment, :attachments,
|
104
|
+
:rich_text then nil
|
94
105
|
else
|
95
106
|
""
|
96
107
|
end
|
@@ -133,7 +144,7 @@ module Rails
|
|
133
144
|
end
|
134
145
|
|
135
146
|
def required?
|
136
|
-
|
147
|
+
reference? && Rails.application.config.active_record.belongs_to_required_by_default
|
137
148
|
end
|
138
149
|
|
139
150
|
def has_index?
|
@@ -152,6 +163,22 @@ module Rails
|
|
152
163
|
type == :token
|
153
164
|
end
|
154
165
|
|
166
|
+
def rich_text?
|
167
|
+
type == :rich_text
|
168
|
+
end
|
169
|
+
|
170
|
+
def attachment?
|
171
|
+
type == :attachment
|
172
|
+
end
|
173
|
+
|
174
|
+
def attachments?
|
175
|
+
type == :attachments
|
176
|
+
end
|
177
|
+
|
178
|
+
def virtual?
|
179
|
+
rich_text? || attachment? || attachments?
|
180
|
+
end
|
181
|
+
|
155
182
|
def inject_options
|
156
183
|
(+"").tap { |s| options_for_migration.each { |k, v| s << ", #{k}: #{v.inspect}" } }
|
157
184
|
end
|
@@ -163,7 +190,6 @@ module Rails
|
|
163
190
|
def options_for_migration
|
164
191
|
@attr_options.dup.tap do |options|
|
165
192
|
if required?
|
166
|
-
options.delete(:required)
|
167
193
|
options[:null] = false
|
168
194
|
end
|
169
195
|
|
@@ -213,7 +213,7 @@ module Rails
|
|
213
213
|
#
|
214
214
|
def self.check_class_collision(options = {}) # :doc:
|
215
215
|
define_method :check_class_collision do
|
216
|
-
name = if respond_to?(:controller_class_name) # for ResourceHelpers
|
216
|
+
name = if respond_to?(:controller_class_name, true) # for ResourceHelpers
|
217
217
|
controller_class_name
|
218
218
|
else
|
219
219
|
class_name
|
@@ -28,7 +28,7 @@ ruby <%= "'#{RUBY_VERSION}'" -%>
|
|
28
28
|
|
29
29
|
<% if depend_on_bootsnap? -%>
|
30
30
|
# Reduces boot times through caching; required in config/boot.rb
|
31
|
-
gem 'bootsnap', '>= 1.4.
|
31
|
+
gem 'bootsnap', '>= 1.4.2', require: false
|
32
32
|
|
33
33
|
<%- end -%>
|
34
34
|
<%- if options.api? -%>
|
@@ -69,10 +69,10 @@ group :test do
|
|
69
69
|
# Adds support for Capybara system testing and selenium driver
|
70
70
|
gem 'capybara', '>= 2.15'
|
71
71
|
gem 'selenium-webdriver'
|
72
|
-
# Easy installation and use of
|
73
|
-
gem '
|
72
|
+
# Easy installation and use of web drivers to run system tests with browsers
|
73
|
+
gem 'webdrivers'
|
74
74
|
end
|
75
|
-
<%- end -%>
|
76
75
|
|
76
|
+
<%- end -%>
|
77
77
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
78
78
|
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
@@ -13,3 +13,11 @@ require("@rails/activestorage").start()
|
|
13
13
|
<%- unless options[:skip_action_cable] -%>
|
14
14
|
require("channels")
|
15
15
|
<%- end -%>
|
16
|
+
|
17
|
+
|
18
|
+
// Uncomment to copy all static images under ../images to the output folder and reference
|
19
|
+
// them with the image_pack_tag helper in views (e.g <%%= image_pack_tag 'rails.png' %>)
|
20
|
+
// or the `imagePath` JavaScript helper below.
|
21
|
+
//
|
22
|
+
// const images = require.context('../images', true)
|
23
|
+
// const imagePath = (name) => images(name, true)
|
@@ -8,7 +8,8 @@ def system!(*args)
|
|
8
8
|
end
|
9
9
|
|
10
10
|
FileUtils.chdir APP_ROOT do
|
11
|
-
# This script is a
|
11
|
+
# This script is a way to setup or update your development environment automatically.
|
12
|
+
# This script is idempotent, so that you can run it at anytime and get an expectable outcome.
|
12
13
|
# Add necessary setup steps to this file.
|
13
14
|
|
14
15
|
puts '== Installing dependencies =='
|
@@ -27,7 +28,7 @@ FileUtils.chdir APP_ROOT do
|
|
27
28
|
# end
|
28
29
|
|
29
30
|
puts "\n== Preparing database =="
|
30
|
-
system! 'bin/rails db:
|
31
|
+
system! 'bin/rails db:prepare'
|
31
32
|
<% end -%>
|
32
33
|
|
33
34
|
puts "\n== Removing old logs and tempfiles =="
|
@@ -15,9 +15,11 @@ Rails.application.configure do
|
|
15
15
|
# Enable/disable caching. By default caching is disabled.
|
16
16
|
# Run rails dev:cache to toggle caching.
|
17
17
|
if Rails.root.join('tmp', 'caching-dev.txt').exist?
|
18
|
+
<%- unless options.api? -%>
|
18
19
|
config.action_controller.perform_caching = true
|
19
20
|
config.action_controller.enable_fragment_cache_logging = true
|
20
21
|
|
22
|
+
<%- end -%>
|
21
23
|
config.cache_store = :memory_store
|
22
24
|
config.public_file_server.headers = {
|
23
25
|
'Cache-Control' => "public, max-age=#{2.days.to_i}"
|
@@ -12,7 +12,9 @@ Rails.application.configure do
|
|
12
12
|
|
13
13
|
# Full error reports are disabled and caching is turned on.
|
14
14
|
config.consider_all_requests_local = false
|
15
|
+
<%- unless options.api? -%>
|
15
16
|
config.action_controller.perform_caching = true
|
17
|
+
<%- end -%>
|
16
18
|
|
17
19
|
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
|
18
20
|
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
|
@@ -1,11 +1,17 @@
|
|
1
|
+
# The test environment is used exclusively to run your application's
|
2
|
+
# test suite. You never need to work with it otherwise. Remember that
|
3
|
+
# your test database is "scratch space" for the test suite and is wiped
|
4
|
+
# and recreated between test runs. Don't rely on the data there!
|
5
|
+
|
1
6
|
Rails.application.configure do
|
2
7
|
# Settings specified here will take precedence over those in config/application.rb.
|
3
8
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
9
|
+
<%-# Spring executes the reloaders when files change. %>
|
10
|
+
<%- if spring_install? -%>
|
11
|
+
config.cache_classes = false
|
12
|
+
<%- else -%>
|
8
13
|
config.cache_classes = true
|
14
|
+
<%- end -%>
|
9
15
|
|
10
16
|
# Do not eager load code on boot. This avoids loading your whole application
|
11
17
|
# just for the purpose of running a single test. If you are using a tool that
|
data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt
CHANGED
@@ -23,6 +23,9 @@
|
|
23
23
|
# If you are using UJS then enable automatic nonce generation
|
24
24
|
# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
|
25
25
|
|
26
|
+
# Set the nonce only to specific directives
|
27
|
+
# Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
|
28
|
+
|
26
29
|
# Report CSP violations to a specified URI
|
27
30
|
# For further information see the following documentation:
|
28
31
|
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt
CHANGED
@@ -16,6 +16,9 @@
|
|
16
16
|
# It's best enabled when your entire app is migrated and stable on 6.0.
|
17
17
|
# Rails.application.config.action_dispatch.use_cookies_with_metadata = true
|
18
18
|
|
19
|
+
# Change the return value of `ActionDispatch::Response#content_type` to Content-Type header without modification.
|
20
|
+
# Rails.application.config.action_dispatch.return_only_media_type_on_content_type = false
|
21
|
+
|
19
22
|
# Return false instead of self when enqueuing is aborted from a callback.
|
20
23
|
# Rails.application.config.active_job.return_false_on_aborted_enqueue = true
|
21
24
|
|
@@ -23,6 +26,10 @@
|
|
23
26
|
# Rails.application.config.active_storage.queues.analysis = :active_storage_analysis
|
24
27
|
# Rails.application.config.active_storage.queues.purge = :active_storage_purge
|
25
28
|
|
29
|
+
# When assigning to a collection of attachments declared via `has_many_attached`, replace existing
|
30
|
+
# attachments instead of appending. Use #attach to add new attachments without replacing existing ones.
|
31
|
+
# Rails.application.config.active_storage.replace_on_assign_to_many = true
|
32
|
+
|
26
33
|
# Use ActionMailer::MailDeliveryJob for sending parameterized and normal mail.
|
27
34
|
#
|
28
35
|
# The default delivery jobs (ActionMailer::Parameterized::DeliveryJob, ActionMailer::DeliveryJob),
|
@@ -31,3 +38,8 @@
|
|
31
38
|
# MailDeliveryJob to ensure all delivery jobs are processed properly.
|
32
39
|
# Make sure your entire app is migrated and stable on 6.0 before using this setting.
|
33
40
|
# Rails.application.config.action_mailer.delivery_job = "ActionMailer::MailDeliveryJob"
|
41
|
+
|
42
|
+
# Enable the same cache key to be reused when the object being cached of type
|
43
|
+
# `ActiveRecord::Relation` changes by moving the volatile information (max updated at and count)
|
44
|
+
# of the relation's cache key into the cache version to support recycling cache key.
|
45
|
+
# Rails.application.config.active_record.collection_cache_versioning = true
|
@@ -16,6 +16,9 @@ port ENV.fetch("PORT") { 3000 }
|
|
16
16
|
#
|
17
17
|
environment ENV.fetch("RAILS_ENV") { "development" }
|
18
18
|
|
19
|
+
# Specifies the `pidfile` that Puma will use.
|
20
|
+
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
|
21
|
+
|
19
22
|
# Specifies the number of `workers` to boot in clustered mode.
|
20
23
|
# Workers are forked web server processes. If using threads and workers together
|
21
24
|
# the concurrency of the application would be max `threads` * `workers`.
|