railties 7.0.8.6 → 7.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/lib/rails/application.rb +7 -4
- data/lib/rails/engine.rb +5 -4
- data/lib/rails/gem_version.rb +2 -2
- data/lib/rails/generators/active_model.rb +26 -12
- data/lib/rails/generators/app_base.rb +1 -1
- data/lib/rails/generators/base.rb +5 -5
- data/lib/rails/generators/generated_attribute.rb +1 -0
- data/lib/rails/generators/rails/app/templates/Gemfile.tt +1 -1
- data/lib/rails/generators.rb +1 -1
- data/lib/rails/paths.rb +13 -10
- metadata +12 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: de112f76943104a8bdc7e264cb267a5f3cea0b554e6a03b8c9671c495aee8906
|
|
4
|
+
data.tar.gz: fd4059cb2096c77e38ac4c52e96432ed8f68dc819842b9046e7da1294d35946e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0835e1c2386b7b1f3ccffd5b60adeffc74947e62d7c6d43f209a66c33932b4401ba28c476057b92edae6bf6531b496624661f2bb43a74051af986f4add6f8a9d'
|
|
7
|
+
data.tar.gz: '021194bb1725f396124cce3868c89a8b5b666eacf1df80d0207b65de73b67e4a562bd809627980eab700749539571a378185e9fd9e4d07a379e97da437748dc7'
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## Rails 7.0.10 (October 28, 2025) ##
|
|
2
|
+
|
|
3
|
+
* No changes.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Rails 7.0.9 (October 28, 2025) ##
|
|
7
|
+
|
|
8
|
+
* No changes.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Rails 7.0.8.7 (December 10, 2024) ##
|
|
12
|
+
|
|
13
|
+
* No changes.
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
## Rails 7.0.8.6 (October 23, 2024) ##
|
|
2
17
|
|
|
3
18
|
* No changes.
|
data/lib/rails/application.rb
CHANGED
|
@@ -184,8 +184,7 @@ module Rails
|
|
|
184
184
|
end
|
|
185
185
|
|
|
186
186
|
# Convenience for loading config/foo.yml for the current Rails env.
|
|
187
|
-
#
|
|
188
|
-
# Examples:
|
|
187
|
+
# Example:
|
|
189
188
|
#
|
|
190
189
|
# # config/exception_notification.yml:
|
|
191
190
|
# production:
|
|
@@ -196,13 +195,15 @@ module Rails
|
|
|
196
195
|
# url: http://localhost:3001
|
|
197
196
|
# namespace: my_app_development
|
|
198
197
|
#
|
|
198
|
+
# <code></code>
|
|
199
|
+
#
|
|
199
200
|
# # config/environments/production.rb
|
|
200
201
|
# Rails.application.configure do
|
|
201
202
|
# config.middleware.use ExceptionNotifier, config_for(:exception_notification)
|
|
202
203
|
# end
|
|
203
204
|
#
|
|
204
|
-
#
|
|
205
|
-
#
|
|
205
|
+
# You can also store configurations in a shared section which will be merged
|
|
206
|
+
# with the environment configuration
|
|
206
207
|
#
|
|
207
208
|
# # config/example.yml
|
|
208
209
|
# shared:
|
|
@@ -215,6 +216,8 @@ module Rails
|
|
|
215
216
|
# bar:
|
|
216
217
|
# qux: 2
|
|
217
218
|
#
|
|
219
|
+
# <code></code>
|
|
220
|
+
#
|
|
218
221
|
# # development environment
|
|
219
222
|
# Rails.application.config_for(:example)[:foo][:bar]
|
|
220
223
|
# # => { baz: 1, qux: 2 }
|
data/lib/rails/engine.rb
CHANGED
|
@@ -15,7 +15,8 @@ module Rails
|
|
|
15
15
|
# feature and application sharing.
|
|
16
16
|
#
|
|
17
17
|
# Any <tt>Rails::Engine</tt> is also a Rails::Railtie, so the same
|
|
18
|
-
# methods (like
|
|
18
|
+
# methods (like {rake_tasks}[rdoc-ref:Rails::Railtie::rake_tasks] and
|
|
19
|
+
# {generators}[rdoc-ref:Rails::Railtie::generators]) and configuration
|
|
19
20
|
# options that are available in railties can also be used in engines.
|
|
20
21
|
#
|
|
21
22
|
# == Creating an Engine
|
|
@@ -116,7 +117,7 @@ module Rails
|
|
|
116
117
|
# An engine can also be a Rack application. It can be useful if you have a Rack application that
|
|
117
118
|
# you would like to provide with some of the +Engine+'s features.
|
|
118
119
|
#
|
|
119
|
-
# To do that, use the
|
|
120
|
+
# To do that, use the ::endpoint method:
|
|
120
121
|
#
|
|
121
122
|
# module MyEngine
|
|
122
123
|
# class Engine < Rails::Engine
|
|
@@ -197,7 +198,7 @@ module Rails
|
|
|
197
198
|
# named routes from the application will be available to your engine's controllers as well.
|
|
198
199
|
#
|
|
199
200
|
# However, sometimes you want to isolate your engine from the application, especially if your engine
|
|
200
|
-
# has its own router. To do that, you simply need to call
|
|
201
|
+
# has its own router. To do that, you simply need to call ::isolate_namespace. This method requires
|
|
201
202
|
# you to pass a module where all your controllers, helpers, and models should be nested to:
|
|
202
203
|
#
|
|
203
204
|
# module MyEngine
|
|
@@ -327,7 +328,7 @@ module Rails
|
|
|
327
328
|
# To use engine's migrations in application you can use the rake task below, which copies them to
|
|
328
329
|
# application's dir:
|
|
329
330
|
#
|
|
330
|
-
# rake ENGINE_NAME:install:migrations
|
|
331
|
+
# $ rake ENGINE_NAME:install:migrations
|
|
331
332
|
#
|
|
332
333
|
# Note that some of the migrations may be skipped if a migration with the same name already exists
|
|
333
334
|
# in application. In such a situation you must decide whether to leave that migration or rename the
|
data/lib/rails/gem_version.rb
CHANGED
|
@@ -32,21 +32,27 @@ module Rails
|
|
|
32
32
|
@name = name
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
#
|
|
35
|
+
# Used for:
|
|
36
|
+
#
|
|
37
|
+
# * GET +index+
|
|
36
38
|
def self.all(klass)
|
|
37
39
|
"#{klass}.all"
|
|
38
40
|
end
|
|
39
41
|
|
|
40
|
-
#
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
#
|
|
42
|
+
# Used for:
|
|
43
|
+
#
|
|
44
|
+
# * GET +show+
|
|
45
|
+
# * GET +edit+
|
|
46
|
+
# * PATCH / PUT +update+
|
|
47
|
+
# * DELETE +destroy+
|
|
44
48
|
def self.find(klass, params = nil)
|
|
45
49
|
"#{klass}.find(#{params})"
|
|
46
50
|
end
|
|
47
51
|
|
|
48
|
-
#
|
|
49
|
-
#
|
|
52
|
+
# Used for:
|
|
53
|
+
#
|
|
54
|
+
# * GET +new+
|
|
55
|
+
# * POST +create+
|
|
50
56
|
def self.build(klass, params = nil)
|
|
51
57
|
if params
|
|
52
58
|
"#{klass}.new(#{params})"
|
|
@@ -55,23 +61,31 @@ module Rails
|
|
|
55
61
|
end
|
|
56
62
|
end
|
|
57
63
|
|
|
58
|
-
#
|
|
64
|
+
# Used for:
|
|
65
|
+
#
|
|
66
|
+
# * POST +create+
|
|
59
67
|
def save
|
|
60
68
|
"#{name}.save"
|
|
61
69
|
end
|
|
62
70
|
|
|
63
|
-
#
|
|
71
|
+
# Used for:
|
|
72
|
+
#
|
|
73
|
+
# * PATCH / PUT +update+
|
|
64
74
|
def update(params = nil)
|
|
65
75
|
"#{name}.update(#{params})"
|
|
66
76
|
end
|
|
67
77
|
|
|
68
|
-
#
|
|
69
|
-
#
|
|
78
|
+
# Used for:
|
|
79
|
+
#
|
|
80
|
+
# * POST +create+
|
|
81
|
+
# * PATCH / PUT +update+
|
|
70
82
|
def errors
|
|
71
83
|
"#{name}.errors"
|
|
72
84
|
end
|
|
73
85
|
|
|
74
|
-
#
|
|
86
|
+
# Used for:
|
|
87
|
+
#
|
|
88
|
+
# * DELETE +destroy+
|
|
75
89
|
def destroy
|
|
76
90
|
"#{name}.destroy"
|
|
77
91
|
end
|
|
@@ -169,7 +169,7 @@ module Rails
|
|
|
169
169
|
end
|
|
170
170
|
|
|
171
171
|
def web_server_gemfile_entry # :doc:
|
|
172
|
-
GemfileEntry.new "puma", "
|
|
172
|
+
GemfileEntry.new "puma", ">= 5.0", "Use the Puma web server [https://github.com/puma/puma]"
|
|
173
173
|
end
|
|
174
174
|
|
|
175
175
|
def asset_pipeline_gemfile_entry
|
|
@@ -79,7 +79,7 @@ module Rails
|
|
|
79
79
|
#
|
|
80
80
|
# For example, if the user invoke the controller generator as:
|
|
81
81
|
#
|
|
82
|
-
# bin/rails generate controller Account --test-framework=test_unit
|
|
82
|
+
# $ bin/rails generate controller Account --test-framework=test_unit
|
|
83
83
|
#
|
|
84
84
|
# The controller generator will then try to invoke the following generators:
|
|
85
85
|
#
|
|
@@ -134,11 +134,11 @@ module Rails
|
|
|
134
134
|
# All hooks come with switches for user interface. If you do not want
|
|
135
135
|
# to use any test framework, you can do:
|
|
136
136
|
#
|
|
137
|
-
# bin/rails generate controller Account --skip-test-framework
|
|
137
|
+
# $ bin/rails generate controller Account --skip-test-framework
|
|
138
138
|
#
|
|
139
139
|
# Or similarly:
|
|
140
140
|
#
|
|
141
|
-
# bin/rails generate controller Account --no-test-framework
|
|
141
|
+
# $ bin/rails generate controller Account --no-test-framework
|
|
142
142
|
#
|
|
143
143
|
# ==== Boolean hooks
|
|
144
144
|
#
|
|
@@ -150,7 +150,7 @@ module Rails
|
|
|
150
150
|
#
|
|
151
151
|
# Then, if you want webrat to be invoked, just supply:
|
|
152
152
|
#
|
|
153
|
-
# bin/rails generate controller Account --webrat
|
|
153
|
+
# $ bin/rails generate controller Account --webrat
|
|
154
154
|
#
|
|
155
155
|
# The hooks lookup is similar as above:
|
|
156
156
|
#
|
|
@@ -214,7 +214,7 @@ module Rails
|
|
|
214
214
|
end
|
|
215
215
|
|
|
216
216
|
# Returns the default source root for a given generator. This is used internally
|
|
217
|
-
# by
|
|
217
|
+
# by \Rails to set its generators source root. If you want to customize your source
|
|
218
218
|
# root, you should use source_root.
|
|
219
219
|
def self.default_source_root
|
|
220
220
|
return unless base_name && generator_name
|
data/lib/rails/generators.rb
CHANGED
|
@@ -93,7 +93,7 @@ module Rails
|
|
|
93
93
|
end
|
|
94
94
|
|
|
95
95
|
# Hold configured generators fallbacks. If a plugin developer wants a
|
|
96
|
-
# generator group to
|
|
96
|
+
# generator group to fall back to another group in case of missing generators,
|
|
97
97
|
# they can add a fallback.
|
|
98
98
|
#
|
|
99
99
|
# For example, shoulda is considered a test_framework and is an extension
|
data/lib/rails/paths.rb
CHANGED
|
@@ -4,9 +4,9 @@ require "pathname"
|
|
|
4
4
|
|
|
5
5
|
module Rails
|
|
6
6
|
module Paths
|
|
7
|
-
# This object is an extended hash that behaves as root of the
|
|
7
|
+
# This object is an extended hash that behaves as root of the Rails::Paths system.
|
|
8
8
|
# It allows you to collect information about how you want to structure your application
|
|
9
|
-
# paths through a Hash-like API. It requires you to give a physical path on initialization.
|
|
9
|
+
# paths through a Hash-like \API. It requires you to give a physical path on initialization.
|
|
10
10
|
#
|
|
11
11
|
# root = Root.new "/rails"
|
|
12
12
|
# root.add "app/controllers", eager_load: true
|
|
@@ -18,7 +18,8 @@ module Rails
|
|
|
18
18
|
# path.eager_load? # => true
|
|
19
19
|
# path.is_a?(Rails::Paths::Path) # => true
|
|
20
20
|
#
|
|
21
|
-
# The
|
|
21
|
+
# The Path[rdoc-ref:Rails::Paths::Path] object is simply an enumerable and
|
|
22
|
+
# allows you to easily add extra paths:
|
|
22
23
|
#
|
|
23
24
|
# path.is_a?(Enumerable) # => true
|
|
24
25
|
# path.to_ary.inspect # => ["app/controllers"]
|
|
@@ -26,17 +27,19 @@ module Rails
|
|
|
26
27
|
# path << "lib/controllers"
|
|
27
28
|
# path.to_ary.inspect # => ["app/controllers", "lib/controllers"]
|
|
28
29
|
#
|
|
29
|
-
# Notice that when you add a path using
|
|
30
|
-
#
|
|
31
|
-
#
|
|
30
|
+
# Notice that when you add a path using #add, the
|
|
31
|
+
# Path[rdoc-ref:Rails::Paths::Path] object created already contains the path
|
|
32
|
+
# with the same path value given to #add. In some situations, you may not
|
|
33
|
+
# want this behavior, so you can give <tt>:with</tt> as option.
|
|
32
34
|
#
|
|
33
35
|
# root.add "config/routes", with: "config/routes.rb"
|
|
34
36
|
# root["config/routes"].inspect # => ["config/routes.rb"]
|
|
35
37
|
#
|
|
36
|
-
# The
|
|
37
|
-
# eager_load
|
|
38
|
+
# The #add method accepts the following options as arguments:
|
|
39
|
+
# +eager_load+, +autoload+, +autoload_once+, and +glob+.
|
|
38
40
|
#
|
|
39
|
-
# Finally, the
|
|
41
|
+
# Finally, the Path[rdoc-ref:Rails::Paths::Path] object also provides a few
|
|
42
|
+
# helpers:
|
|
40
43
|
#
|
|
41
44
|
# root = Root.new "/rails"
|
|
42
45
|
# root.add "app/controllers"
|
|
@@ -44,7 +47,7 @@ module Rails
|
|
|
44
47
|
# root["app/controllers"].expanded # => ["/rails/app/controllers"]
|
|
45
48
|
# root["app/controllers"].existent # => ["/rails/app/controllers"]
|
|
46
49
|
#
|
|
47
|
-
# Check the
|
|
50
|
+
# Check the Rails::Paths::Path documentation for more information.
|
|
48
51
|
class Root
|
|
49
52
|
attr_accessor :path
|
|
50
53
|
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: railties
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.0.
|
|
4
|
+
version: 7.0.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activesupport
|
|
@@ -16,28 +15,28 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - '='
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 7.0.
|
|
18
|
+
version: 7.0.10
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - '='
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 7.0.
|
|
25
|
+
version: 7.0.10
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: actionpack
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
30
29
|
requirements:
|
|
31
30
|
- - '='
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 7.0.
|
|
32
|
+
version: 7.0.10
|
|
34
33
|
type: :runtime
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
37
|
- - '='
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 7.0.
|
|
39
|
+
version: 7.0.10
|
|
41
40
|
- !ruby/object:Gem::Dependency
|
|
42
41
|
name: rake
|
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -100,14 +99,14 @@ dependencies:
|
|
|
100
99
|
requirements:
|
|
101
100
|
- - '='
|
|
102
101
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: 7.0.
|
|
102
|
+
version: 7.0.10
|
|
104
103
|
type: :development
|
|
105
104
|
prerelease: false
|
|
106
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
106
|
requirements:
|
|
108
107
|
- - '='
|
|
109
108
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: 7.0.
|
|
109
|
+
version: 7.0.10
|
|
111
110
|
description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
|
|
112
111
|
email: david@loudthinking.com
|
|
113
112
|
executables:
|
|
@@ -422,12 +421,11 @@ licenses:
|
|
|
422
421
|
- MIT
|
|
423
422
|
metadata:
|
|
424
423
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
|
425
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.0.
|
|
426
|
-
documentation_uri: https://api.rubyonrails.org/v7.0.
|
|
424
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.0.10/railties/CHANGELOG.md
|
|
425
|
+
documentation_uri: https://api.rubyonrails.org/v7.0.10/
|
|
427
426
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
|
428
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.0.
|
|
427
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.0.10/railties
|
|
429
428
|
rubygems_mfa_required: 'true'
|
|
430
|
-
post_install_message:
|
|
431
429
|
rdoc_options:
|
|
432
430
|
- "--exclude"
|
|
433
431
|
- "."
|
|
@@ -444,8 +442,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
444
442
|
- !ruby/object:Gem::Version
|
|
445
443
|
version: '0'
|
|
446
444
|
requirements: []
|
|
447
|
-
rubygems_version: 3.
|
|
448
|
-
signing_key:
|
|
445
|
+
rubygems_version: 3.6.9
|
|
449
446
|
specification_version: 4
|
|
450
447
|
summary: Tools for creating, working with, and running Rails applications.
|
|
451
448
|
test_files: []
|