actionview 8.1.3.1 → 8.1.4.1
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 +102 -0
- data/lib/action_view/dependency_tracker/ruby_tracker.rb +1 -1
- data/lib/action_view/gem_version.rb +1 -1
- data/lib/action_view/helpers/form_helper.rb +1 -1
- data/lib/action_view/helpers/form_options_helper.rb +9 -4
- data/lib/action_view/helpers/sanitize_helper.rb +6 -1
- data/lib/action_view/helpers/tag_helper.rb +13 -4
- data/lib/action_view/helpers/tags/collection_helpers.rb +11 -1
- data/lib/action_view/helpers/tags/week_field.rb +1 -1
- data/lib/action_view/helpers/text_helper.rb +23 -7
- data/lib/action_view/railtie.rb +4 -4
- data/lib/action_view/template.rb +3 -2
- data/lib/action_view/test_case.rb +18 -3
- data/lib/action_view.rb +14 -1
- metadata +17 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4ad9b7f3e9b8677cd772d696b4056bda5f44b3cb2074877698060d83eeb8f501
|
|
4
|
+
data.tar.gz: 6d484d054ced5d8990d0ae4b8134879eb192fea59540f8c6f1dd112ed946ec06
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 47f094fac7bbc29736cf46dcaa570b42d25cdee803cdd522ae81e37a8351f029991b82099a3d4b64c253ae396412e1f112feb509f2e941f4bf806bcab4a95272
|
|
7
|
+
data.tar.gz: 07ee062127ab3554407ea34d293611e347789e5cd65012340302b7a690e18b01ce6630d85483be9eb5e575869df10a3808891ebd98d14ceb674499acdf904594
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,105 @@
|
|
|
1
|
+
## Rails 8.1.4.1 (November 03, 2026) ##
|
|
2
|
+
|
|
3
|
+
* Skip attribute names in tag helpers that are blank once converted to a
|
|
4
|
+
string.
|
|
5
|
+
|
|
6
|
+
A Symbol such as `:" "` is not blank, because `Symbol#blank?` is
|
|
7
|
+
`Symbol#empty?`, so it reached the escaping step and produced an attribute
|
|
8
|
+
with no name. The asset helpers symbolize their keys, so an ordinary String
|
|
9
|
+
key reached the same place.
|
|
10
|
+
|
|
11
|
+
[GHSA-68p9-83h6-5wpj]
|
|
12
|
+
|
|
13
|
+
*Mike Dalessio*
|
|
14
|
+
|
|
15
|
+
* Fix `strip_tags` to encode `"` and `'` in its output.
|
|
16
|
+
|
|
17
|
+
`strip_tags` returns an `html_safe` string, but was not encoding quotation
|
|
18
|
+
marks. The method now encodes all five HTML-significant characters (`&`,
|
|
19
|
+
`<`, `>`, `"`, `'`), consistent with the existing `html_safe` convention.
|
|
20
|
+
|
|
21
|
+
Output used outside HTML, such as in a text template or JSON, now contains
|
|
22
|
+
`"` and `'` where it contained `"` and `'`. `CGI.unescapeHTML`
|
|
23
|
+
decodes them.
|
|
24
|
+
|
|
25
|
+
[GHSA-rq8q-p985-fjq7]
|
|
26
|
+
|
|
27
|
+
*Mike Dalessio*
|
|
28
|
+
|
|
29
|
+
* Escape the matched phrase before substituting it into `highlight`'s
|
|
30
|
+
`:highlighter`.
|
|
31
|
+
|
|
32
|
+
A match was copied into each `\1` of the highlighter as it appeared in
|
|
33
|
+
the sanitized text, which keeps `"` and `'` as they are, so a match
|
|
34
|
+
containing a quote ended a quoted attribute value such as the
|
|
35
|
+
documented `'<a href="search?q=\1">\1</a>'` and added attributes of
|
|
36
|
+
its own. Each substituted group now goes through
|
|
37
|
+
`ERB::Util.html_escape_once`, so quotes in a match render as `"`
|
|
38
|
+
and `'`. Only the numbered placeholders `\0` to `\9` are expanded,
|
|
39
|
+
and a match never replaces the `>` that closes a tag.
|
|
40
|
+
|
|
41
|
+
[GHSA-v6rj-xm57-3p59]
|
|
42
|
+
|
|
43
|
+
*Jeremy Daer*
|
|
44
|
+
|
|
45
|
+
* Require rails-html-sanitizer 1.7.2 or later.
|
|
46
|
+
|
|
47
|
+
With the HTML5 sanitizer, Nokogiri before 1.19.5 left `<` and `>`
|
|
48
|
+
unescaped in attribute values. `highlight` and `simple_format`, which
|
|
49
|
+
edit the sanitized HTML as a string, could then turn markup inside an
|
|
50
|
+
attribute value into live elements. rails-html-sanitizer 1.7.2 requires
|
|
51
|
+
Loofah 2.25.3, which requires Nokogiri 1.19.5.
|
|
52
|
+
|
|
53
|
+
[GHSA-2p2f-4rq4-gjwc]
|
|
54
|
+
|
|
55
|
+
*Mike Dalessio*
|
|
56
|
+
|
|
57
|
+
## Rails 8.1.4 (September 24, 2026) ##
|
|
58
|
+
|
|
59
|
+
* Fix non-ASCII strict locals defaults rendering as mojibake.
|
|
60
|
+
|
|
61
|
+
When a template declared a non-ASCII default in its `locals:` magic comment
|
|
62
|
+
and its body was ASCII-only, the handler returned ASCII-8BIT code and the
|
|
63
|
+
compiled method definition was retagged with it, corrupting the default.
|
|
64
|
+
|
|
65
|
+
*Carlos Daniel Pohlod*
|
|
66
|
+
|
|
67
|
+
* Fix the `:ruby` render tracker not being registered for ERB templates when
|
|
68
|
+
`eager_load` is enabled.
|
|
69
|
+
|
|
70
|
+
*Gabriel Quaresma*
|
|
71
|
+
|
|
72
|
+
* Fix `Encoding::CompatibilityError` when digesting templates with non-ASCII
|
|
73
|
+
content via `DependencyTracker::RubyTracker`.
|
|
74
|
+
|
|
75
|
+
File-backed templates are loaded as ASCII-8BIT. `RubyTracker` now passes
|
|
76
|
+
`template.encode!` to the handler (matching `Template#compiled_source`) so
|
|
77
|
+
handlers such as Haml/Temple can concatenate static UTF-8 strings without
|
|
78
|
+
raising. Fixes #58203.
|
|
79
|
+
|
|
80
|
+
*Edil Talantbek uulu*
|
|
81
|
+
|
|
82
|
+
* Fix `week_field` to not emit invalid week strings at ISO year boundaries.
|
|
83
|
+
|
|
84
|
+
*Kenta Ishizaki*
|
|
85
|
+
|
|
86
|
+
* Fix `ActionView::TestCase#render` to reset `rendered`.
|
|
87
|
+
The behavior was changed when memoization was added in #51093. Now it once again conforms to the documentation.
|
|
88
|
+
|
|
89
|
+
*Jeroen Versteeg*
|
|
90
|
+
|
|
91
|
+
* Fix `FormBuilder#to_partial_path` returning `nil` for subclasses whose
|
|
92
|
+
name does not end in `Builder`.
|
|
93
|
+
|
|
94
|
+
*Kenta Ishizaki*
|
|
95
|
+
|
|
96
|
+
* Fix `collection_radio_buttons` and `collection_check_boxes` generating
|
|
97
|
+
a label `for` attribute that does not match the input `id` when a
|
|
98
|
+
collection value is `nil`.
|
|
99
|
+
|
|
100
|
+
*Kenta Ishizaki*
|
|
101
|
+
|
|
102
|
+
|
|
1
103
|
## Rails 8.1.3.1 (July 29, 2026) ##
|
|
2
104
|
|
|
3
105
|
* No changes.
|
|
@@ -28,7 +28,7 @@ module ActionView
|
|
|
28
28
|
def render_dependencies
|
|
29
29
|
return [] unless template.source.include?("render")
|
|
30
30
|
|
|
31
|
-
compiled_source = template.handler.call(template, template.
|
|
31
|
+
compiled_source = template.handler.call(template, template.encode!)
|
|
32
32
|
|
|
33
33
|
@parser_class.new(@name, compiled_source).render_calls.filter_map do |render_call|
|
|
34
34
|
render_call.gsub(%r|/_|, "/")
|
|
@@ -1706,7 +1706,7 @@ module ActionView
|
|
|
1706
1706
|
end
|
|
1707
1707
|
|
|
1708
1708
|
def self._to_partial_path
|
|
1709
|
-
@_to_partial_path ||= name.demodulize.underscore.sub
|
|
1709
|
+
@_to_partial_path ||= name.demodulize.underscore.sub(/_builder$/, "")
|
|
1710
1710
|
end
|
|
1711
1711
|
|
|
1712
1712
|
def to_partial_path
|
|
@@ -383,6 +383,11 @@ module ActionView
|
|
|
383
383
|
#
|
|
384
384
|
# select_tag 'person', options_from_collection_for_select(@people, 'id', 'name')
|
|
385
385
|
#
|
|
386
|
+
# The +value_method+ and +text_method+ can be a method name to call on each member of the +collection+,
|
|
387
|
+
# or a Proc that will be called for each member of the +collection+:
|
|
388
|
+
#
|
|
389
|
+
# options_from_collection_for_select(@people, Proc.new { |person| person.id }, Proc.new { |person| person.name })
|
|
390
|
+
#
|
|
386
391
|
# If +selected+ is specified as a value or array of values, the element(s) returning a match on +value_method+
|
|
387
392
|
# will be selected option tag(s).
|
|
388
393
|
#
|
|
@@ -415,14 +420,14 @@ module ActionView
|
|
|
415
420
|
#
|
|
416
421
|
# Parameters:
|
|
417
422
|
# * +collection+ - An array of objects representing the <tt><optgroup></tt> tags.
|
|
418
|
-
# * +group_method+ - The name of a method which, when called on a member of +collection+, returns an
|
|
423
|
+
# * +group_method+ - The name of a method which, when called on a member of +collection+, or a Proc, which when called with a member of +collection+, returns an
|
|
419
424
|
# array of child objects representing the <tt><option></tt> tags.
|
|
420
|
-
# * +group_label_method+ - The name of a method which, when called on a member of +collection+, returns a
|
|
425
|
+
# * +group_label_method+ - The name of a method which, when called on a member of +collection+, or a Proc, which when called with a member of +collection+, returns a
|
|
421
426
|
# string to be used as the +label+ attribute for its <tt><optgroup></tt> tag.
|
|
422
427
|
# * +option_key_method+ - The name of a method which, when called on a child object of a member of
|
|
423
|
-
# +collection+, returns a value to be used as the +value+ attribute for its <tt><option></tt> tag.
|
|
428
|
+
# +collection+, or a Proc, which when called with a child object of a member of +collection+, returns a value to be used as the +value+ attribute for its <tt><option></tt> tag.
|
|
424
429
|
# * +option_value_method+ - The name of a method which, when called on a child object of a member of
|
|
425
|
-
# +collection+, returns a value to be used as the contents of its <tt><option></tt> tag.
|
|
430
|
+
# +collection+, or a Proc, which when called with a child object of a member of +collection+, returns a value to be used as the contents of its <tt><option></tt> tag.
|
|
426
431
|
# * +selected_key+ - A value equal to the +value+ attribute for one of the <tt><option></tt> tags,
|
|
427
432
|
# which will have the +selected+ attribute set. Corresponds to the return value of one of the calls
|
|
428
433
|
# to +option_key_method+. If +nil+, no selection is made. Can also be a hash if disabled values are
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "active_support/core_ext/string/output_safety"
|
|
3
4
|
require "rails-html-sanitizer"
|
|
4
5
|
|
|
5
6
|
module ActionView
|
|
@@ -33,6 +34,9 @@ module ActionView
|
|
|
33
34
|
# Please note that sanitizing user-provided text does not guarantee that the
|
|
34
35
|
# resulting markup is valid or even well-formed.
|
|
35
36
|
#
|
|
37
|
+
# The output is markup, which is safe only as element content. Do not use it in an attribute
|
|
38
|
+
# value; use +strip_tags+ or a tag helper such as <tt>tag.a(title: ...)</tt> instead.
|
|
39
|
+
#
|
|
36
40
|
# ==== Options
|
|
37
41
|
#
|
|
38
42
|
# [+:tags+]
|
|
@@ -137,7 +141,8 @@ module ActionView
|
|
|
137
141
|
# strip_tags("> A quote from Smith & Wesson")
|
|
138
142
|
# # => > A quote from Smith & Wesson
|
|
139
143
|
def strip_tags(html)
|
|
140
|
-
self.class.full_sanitizer.sanitize(html)
|
|
144
|
+
stripped = self.class.full_sanitizer.sanitize(html)
|
|
145
|
+
ERB::Util.html_escape_once(stripped) if stripped
|
|
141
146
|
end
|
|
142
147
|
|
|
143
148
|
# Strips all link tags from +html+ leaving just the link text.
|
|
@@ -239,18 +239,27 @@ module ActionView
|
|
|
239
239
|
options.each_pair do |key, value|
|
|
240
240
|
next if key.blank?
|
|
241
241
|
|
|
242
|
+
name = Symbol === key ? key.name : key.to_s
|
|
243
|
+
next if name.blank?
|
|
244
|
+
|
|
242
245
|
type = TAG_TYPES[key]
|
|
243
246
|
if type == :data && value.is_a?(Hash)
|
|
244
247
|
value.each_pair do |k, v|
|
|
245
248
|
next if k.blank? || v.nil?
|
|
246
249
|
|
|
250
|
+
nested_name = Symbol === k ? k.name : k.to_s
|
|
251
|
+
next if nested_name.blank?
|
|
252
|
+
|
|
247
253
|
output << sep
|
|
248
|
-
output << prefix_tag_option(
|
|
254
|
+
output << prefix_tag_option(name, nested_name, v, escape)
|
|
249
255
|
end
|
|
250
256
|
elsif type == :aria && value.is_a?(Hash)
|
|
251
257
|
value.each_pair do |k, v|
|
|
252
258
|
next if k.blank? || v.nil?
|
|
253
259
|
|
|
260
|
+
nested_name = Symbol === k ? k.name : k.to_s
|
|
261
|
+
next if nested_name.blank?
|
|
262
|
+
|
|
254
263
|
case v
|
|
255
264
|
when Array, Hash
|
|
256
265
|
tokens = TagHelper.build_tag_values(v)
|
|
@@ -262,16 +271,16 @@ module ActionView
|
|
|
262
271
|
end
|
|
263
272
|
|
|
264
273
|
output << sep
|
|
265
|
-
output << prefix_tag_option(
|
|
274
|
+
output << prefix_tag_option(name, nested_name, v, escape)
|
|
266
275
|
end
|
|
267
276
|
elsif type == :boolean
|
|
268
277
|
if value
|
|
269
278
|
output << sep
|
|
270
|
-
output << boolean_tag_option(
|
|
279
|
+
output << boolean_tag_option(name)
|
|
271
280
|
end
|
|
272
281
|
elsif !value.nil?
|
|
273
282
|
output << sep
|
|
274
|
-
output << tag_option(
|
|
283
|
+
output << tag_option(name, value, escape)
|
|
275
284
|
end
|
|
276
285
|
end
|
|
277
286
|
output unless output.empty?
|
|
@@ -68,8 +68,18 @@ module ActionView
|
|
|
68
68
|
html_options
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
+
# Sanitize the attribute name used for the label's `for` attribute
|
|
72
|
+
# in collection helpers. When the value is nil or results in an
|
|
73
|
+
# empty sanitized string, skip the trailing underscore to match the
|
|
74
|
+
# id generated by add_default_name_and_id_for_value.
|
|
71
75
|
def sanitize_attribute_name(value)
|
|
72
|
-
|
|
76
|
+
sanitized = sanitized_value(value)
|
|
77
|
+
|
|
78
|
+
if sanitized.empty?
|
|
79
|
+
sanitized_method_name.dup
|
|
80
|
+
else
|
|
81
|
+
"#{sanitized_method_name}_#{sanitized}"
|
|
82
|
+
end
|
|
73
83
|
end
|
|
74
84
|
|
|
75
85
|
def render_collection
|
|
@@ -143,8 +143,15 @@ module ActionView
|
|
|
143
143
|
#
|
|
144
144
|
# [+:highlighter+]
|
|
145
145
|
# The highlighter string. Uses <tt>\1</tt> as the placeholder for a
|
|
146
|
-
# phrase
|
|
147
|
-
#
|
|
146
|
+
# phrase. Defaults to <tt>"<mark>\1</mark>"</tt>. The numbered placeholders
|
|
147
|
+
# <tt>\0</tt> to <tt>\9</tt> are expanded; other +String#sub+ replacement escapes
|
|
148
|
+
# are not. The phrase is HTML escaped, quotes included. This option
|
|
149
|
+
# is ignored if a block is specified.
|
|
150
|
+
#
|
|
151
|
+
# WARNING: Put a placeholder only in element content or inside a
|
|
152
|
+
# quoted attribute value. HTML escaping does not make the phrase safe
|
|
153
|
+
# in an unquoted attribute value, in a URL, JavaScript or CSS
|
|
154
|
+
# context, or in an attribute whose value is HTML, such as +srcdoc+.
|
|
148
155
|
#
|
|
149
156
|
# [+:sanitize+]
|
|
150
157
|
# Whether to sanitize +text+ before highlighting. Defaults to true.
|
|
@@ -163,8 +170,8 @@ module ActionView
|
|
|
163
170
|
# highlight('You searched for: rails', ['for', 'rails'], highlighter: '<em>\1</em>')
|
|
164
171
|
# # => "You searched <em>for</em>: <em>rails</em>"
|
|
165
172
|
#
|
|
166
|
-
# highlight('You searched for: rails', 'rails', highlighter: '<
|
|
167
|
-
# # => "You searched for: <
|
|
173
|
+
# highlight('You searched for: rails', 'rails', highlighter: '<mark title="\1">\1</mark>')
|
|
174
|
+
# # => "You searched for: <mark title=\"rails\">rails</mark>"
|
|
168
175
|
#
|
|
169
176
|
# highlight('You searched for: rails', 'rails') { |match| link_to(search_path(q: match)) }
|
|
170
177
|
# # => "You searched for: <a href=\"search?q=rails\">rails</a>"
|
|
@@ -179,14 +186,23 @@ module ActionView
|
|
|
179
186
|
else
|
|
180
187
|
patterns = Array(phrases).map { |phrase| Regexp === phrase ? phrase : Regexp.escape(phrase) }
|
|
181
188
|
pattern = /(#{patterns.join("|")})/i
|
|
189
|
+
# The text after a tag begins with the ">" that closes it. Leave it
|
|
190
|
+
# in the segment so phrases can see it as context, but keep it out
|
|
191
|
+
# of the match so the highlighter can't take the place of the ">".
|
|
192
|
+
pattern_after_tag = /(?!\A)#{pattern}/
|
|
182
193
|
highlighter = options.fetch(:highlighter, '<mark>\1</mark>') unless block
|
|
183
194
|
|
|
184
|
-
text.scan(/<[^>]*|[^<]+/).
|
|
195
|
+
text.scan(/<[^>]*|[^<]+/).each_with_index do |segment, index|
|
|
185
196
|
if !segment.start_with?("<")
|
|
197
|
+
segment_pattern = index > 0 ? pattern_after_tag : pattern
|
|
198
|
+
|
|
186
199
|
if block
|
|
187
|
-
segment.gsub!(
|
|
200
|
+
segment.gsub!(segment_pattern, &block)
|
|
188
201
|
else
|
|
189
|
-
segment.gsub!(
|
|
202
|
+
segment.gsub!(segment_pattern) do
|
|
203
|
+
match = Regexp.last_match
|
|
204
|
+
highlighter.gsub(/\\(\d)/) { ERB::Util.html_escape_once(match[$1.to_i]) }
|
|
205
|
+
end
|
|
190
206
|
end
|
|
191
207
|
end
|
|
192
208
|
end.join
|
data/lib/action_view/railtie.rb
CHANGED
|
@@ -78,10 +78,6 @@ module ActionView
|
|
|
78
78
|
end
|
|
79
79
|
|
|
80
80
|
config.after_initialize do |app|
|
|
81
|
-
config.after_initialize do
|
|
82
|
-
ActionView.render_tracker = config.action_view.render_tracker
|
|
83
|
-
end
|
|
84
|
-
|
|
85
81
|
ActiveSupport.on_load(:action_view) do
|
|
86
82
|
app.config.action_view.each do |k, v|
|
|
87
83
|
next if k == :render_tracker
|
|
@@ -106,6 +102,10 @@ module ActionView
|
|
|
106
102
|
end
|
|
107
103
|
end
|
|
108
104
|
|
|
105
|
+
initializer "action_view.set_render_tracker" do |app|
|
|
106
|
+
ActionView.render_tracker = app.config.action_view.render_tracker
|
|
107
|
+
end
|
|
108
|
+
|
|
109
109
|
initializer "action_view.setup_action_pack" do |app|
|
|
110
110
|
ActiveSupport.on_load(:action_controller) do
|
|
111
111
|
ActionView::RoutingUrlFor.include(ActionDispatch::Routing::UrlFor)
|
data/lib/action_view/template.rb
CHANGED
|
@@ -470,8 +470,9 @@ module ActionView
|
|
|
470
470
|
end
|
|
471
471
|
end_src
|
|
472
472
|
|
|
473
|
-
# Make sure the source is in the encoding of the returned code
|
|
474
|
-
|
|
473
|
+
# Make sure the source is in the encoding of the returned code.
|
|
474
|
+
# ASCII-only code has no encoding worth propagating.
|
|
475
|
+
source.force_encoding(code.encoding) unless code.ascii_only?
|
|
475
476
|
|
|
476
477
|
# In case we get back a String from a handler that is not in
|
|
477
478
|
# BINARY or the default_internal, encode it to the default_internal
|
|
@@ -272,7 +272,7 @@ module ActionView
|
|
|
272
272
|
@request = @controller.request
|
|
273
273
|
@view_flow = ActionView::OutputFlow.new
|
|
274
274
|
@output_buffer = ActionView::OutputBuffer.new
|
|
275
|
-
|
|
275
|
+
_reset_rendered
|
|
276
276
|
|
|
277
277
|
test_case_instance = self
|
|
278
278
|
controller_class.define_method(:_test_case) { test_case_instance }
|
|
@@ -284,8 +284,18 @@ module ActionView
|
|
|
284
284
|
|
|
285
285
|
def render(options = {}, local_assigns = {}, &block)
|
|
286
286
|
view.assign(view_assigns)
|
|
287
|
-
|
|
288
|
-
|
|
287
|
+
|
|
288
|
+
if @_rendering
|
|
289
|
+
view.render(options, local_assigns, &block)
|
|
290
|
+
else
|
|
291
|
+
_reset_rendered
|
|
292
|
+
@_rendering = true
|
|
293
|
+
output = view.render(options, local_assigns, &block)
|
|
294
|
+
@rendered << output
|
|
295
|
+
output
|
|
296
|
+
end
|
|
297
|
+
ensure
|
|
298
|
+
@_rendering = false unless @_rendering.nil?
|
|
289
299
|
end
|
|
290
300
|
|
|
291
301
|
def rendered_views
|
|
@@ -383,6 +393,7 @@ module ActionView
|
|
|
383
393
|
:@method_name,
|
|
384
394
|
:@output_buffer,
|
|
385
395
|
:@_partials,
|
|
396
|
+
:@_rendering,
|
|
386
397
|
:@passed,
|
|
387
398
|
:@rendered,
|
|
388
399
|
:@request,
|
|
@@ -412,6 +423,10 @@ module ActionView
|
|
|
412
423
|
end]
|
|
413
424
|
end
|
|
414
425
|
|
|
426
|
+
def _reset_rendered
|
|
427
|
+
@rendered = self.class.content_class.new(+"")
|
|
428
|
+
end
|
|
429
|
+
|
|
415
430
|
def method_missing(selector, ...)
|
|
416
431
|
begin
|
|
417
432
|
routes = @controller.respond_to?(:_routes) && @controller._routes
|
data/lib/action_view.rb
CHANGED
|
@@ -37,6 +37,7 @@ module ActionView
|
|
|
37
37
|
eager_autoload do
|
|
38
38
|
autoload :Base
|
|
39
39
|
autoload :Context
|
|
40
|
+
autoload :DependencyTracker
|
|
40
41
|
autoload :Digestor
|
|
41
42
|
autoload :Helpers
|
|
42
43
|
autoload :LookupContext
|
|
@@ -91,7 +92,19 @@ module ActionView
|
|
|
91
92
|
autoload :CacheExpiry
|
|
92
93
|
autoload :TestCase
|
|
93
94
|
|
|
94
|
-
singleton_class.
|
|
95
|
+
singleton_class.attr_reader :render_tracker
|
|
96
|
+
|
|
97
|
+
def self.render_tracker=(value)
|
|
98
|
+
@render_tracker = value
|
|
99
|
+
case value
|
|
100
|
+
when :ruby
|
|
101
|
+
DependencyTracker.register_tracker :erb, DependencyTracker::RubyTracker
|
|
102
|
+
else
|
|
103
|
+
DependencyTracker.register_tracker :erb, DependencyTracker::ERBTracker
|
|
104
|
+
end
|
|
105
|
+
value
|
|
106
|
+
end
|
|
107
|
+
|
|
95
108
|
self.render_tracker = :regex
|
|
96
109
|
|
|
97
110
|
def self.eager_load!
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: actionview
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.1.
|
|
4
|
+
version: 8.1.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 8.1.
|
|
18
|
+
version: 8.1.4.1
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 8.1.
|
|
25
|
+
version: 8.1.4.1
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: builder
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -58,6 +58,9 @@ dependencies:
|
|
|
58
58
|
- - "~>"
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
60
|
version: '1.6'
|
|
61
|
+
- - ">="
|
|
62
|
+
- !ruby/object:Gem::Version
|
|
63
|
+
version: 1.7.2
|
|
61
64
|
type: :runtime
|
|
62
65
|
prerelease: false
|
|
63
66
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -65,6 +68,9 @@ dependencies:
|
|
|
65
68
|
- - "~>"
|
|
66
69
|
- !ruby/object:Gem::Version
|
|
67
70
|
version: '1.6'
|
|
71
|
+
- - ">="
|
|
72
|
+
- !ruby/object:Gem::Version
|
|
73
|
+
version: 1.7.2
|
|
68
74
|
- !ruby/object:Gem::Dependency
|
|
69
75
|
name: rails-dom-testing
|
|
70
76
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -85,28 +91,28 @@ dependencies:
|
|
|
85
91
|
requirements:
|
|
86
92
|
- - '='
|
|
87
93
|
- !ruby/object:Gem::Version
|
|
88
|
-
version: 8.1.
|
|
94
|
+
version: 8.1.4.1
|
|
89
95
|
type: :development
|
|
90
96
|
prerelease: false
|
|
91
97
|
version_requirements: !ruby/object:Gem::Requirement
|
|
92
98
|
requirements:
|
|
93
99
|
- - '='
|
|
94
100
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: 8.1.
|
|
101
|
+
version: 8.1.4.1
|
|
96
102
|
- !ruby/object:Gem::Dependency
|
|
97
103
|
name: activemodel
|
|
98
104
|
requirement: !ruby/object:Gem::Requirement
|
|
99
105
|
requirements:
|
|
100
106
|
- - '='
|
|
101
107
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: 8.1.
|
|
108
|
+
version: 8.1.4.1
|
|
103
109
|
type: :development
|
|
104
110
|
prerelease: false
|
|
105
111
|
version_requirements: !ruby/object:Gem::Requirement
|
|
106
112
|
requirements:
|
|
107
113
|
- - '='
|
|
108
114
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: 8.1.
|
|
115
|
+
version: 8.1.4.1
|
|
110
116
|
description: Simple, battle-tested conventions and helpers for building web pages.
|
|
111
117
|
email: david@loudthinking.com
|
|
112
118
|
executables: []
|
|
@@ -247,10 +253,10 @@ licenses:
|
|
|
247
253
|
- MIT
|
|
248
254
|
metadata:
|
|
249
255
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
|
250
|
-
changelog_uri: https://github.com/rails/rails/blob/v8.1.
|
|
251
|
-
documentation_uri: https://api.rubyonrails.org/v8.1.
|
|
256
|
+
changelog_uri: https://github.com/rails/rails/blob/v8.1.4.1/actionview/CHANGELOG.md
|
|
257
|
+
documentation_uri: https://api.rubyonrails.org/v8.1.4.1/
|
|
252
258
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
|
253
|
-
source_code_uri: https://github.com/rails/rails/tree/v8.1.
|
|
259
|
+
source_code_uri: https://github.com/rails/rails/tree/v8.1.4.1/actionview
|
|
254
260
|
rubygems_mfa_required: 'true'
|
|
255
261
|
rdoc_options: []
|
|
256
262
|
require_paths:
|
|
@@ -267,7 +273,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
267
273
|
version: '0'
|
|
268
274
|
requirements:
|
|
269
275
|
- none
|
|
270
|
-
rubygems_version: 4.0.
|
|
276
|
+
rubygems_version: 4.0.20
|
|
271
277
|
specification_version: 4
|
|
272
278
|
summary: Rendering framework putting the V in MVC (part of Rails).
|
|
273
279
|
test_files: []
|