actionview 6.0.6.1 → 6.1.7.2
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.
Potentially problematic release.
This version of actionview might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +226 -220
- data/MIT-LICENSE +1 -2
- data/lib/action_view/base.rb +18 -49
- data/lib/action_view/cache_expiry.rb +1 -2
- data/lib/action_view/dependency_tracker.rb +10 -4
- data/lib/action_view/digestor.rb +3 -2
- data/lib/action_view/gem_version.rb +3 -3
- data/lib/action_view/helpers/asset_tag_helper.rb +57 -17
- data/lib/action_view/helpers/asset_url_helper.rb +6 -4
- data/lib/action_view/helpers/atom_feed_helper.rb +2 -1
- data/lib/action_view/helpers/cache_helper.rb +10 -16
- data/lib/action_view/helpers/date_helper.rb +6 -5
- data/lib/action_view/helpers/form_helper.rb +66 -30
- data/lib/action_view/helpers/form_options_helper.rb +7 -16
- data/lib/action_view/helpers/form_tag_helper.rb +4 -3
- data/lib/action_view/helpers/javascript_helper.rb +3 -3
- data/lib/action_view/helpers/number_helper.rb +6 -6
- data/lib/action_view/helpers/rendering_helper.rb +11 -3
- data/lib/action_view/helpers/tag_helper.rb +98 -22
- data/lib/action_view/helpers/tags/base.rb +10 -6
- data/lib/action_view/helpers/tags/check_box.rb +1 -1
- data/lib/action_view/helpers/tags/date_field.rb +1 -1
- data/lib/action_view/helpers/tags/date_select.rb +2 -2
- data/lib/action_view/helpers/tags/datetime_local_field.rb +1 -1
- data/lib/action_view/helpers/tags/hidden_field.rb +4 -0
- data/lib/action_view/helpers/tags/label.rb +4 -0
- data/lib/action_view/helpers/tags/month_field.rb +1 -1
- data/lib/action_view/helpers/tags/select.rb +1 -1
- data/lib/action_view/helpers/tags/time_field.rb +1 -1
- data/lib/action_view/helpers/tags/week_field.rb +1 -1
- data/lib/action_view/helpers/text_helper.rb +2 -2
- data/lib/action_view/helpers/translation_helper.rb +88 -50
- data/lib/action_view/helpers/url_helper.rb +136 -24
- data/lib/action_view/layouts.rb +3 -2
- data/lib/action_view/log_subscriber.rb +26 -10
- data/lib/action_view/lookup_context.rb +3 -18
- data/lib/action_view/path_set.rb +0 -3
- data/lib/action_view/railtie.rb +39 -46
- data/lib/action_view/renderer/abstract_renderer.rb +93 -14
- data/lib/action_view/renderer/collection_renderer.rb +196 -0
- data/lib/action_view/renderer/object_renderer.rb +34 -0
- data/lib/action_view/renderer/partial_renderer/collection_caching.rb +25 -26
- data/lib/action_view/renderer/partial_renderer.rb +20 -282
- data/lib/action_view/renderer/renderer.rb +44 -1
- data/lib/action_view/renderer/streaming_template_renderer.rb +5 -1
- data/lib/action_view/renderer/template_renderer.rb +15 -12
- data/lib/action_view/rendering.rb +3 -1
- data/lib/action_view/routing_url_for.rb +1 -1
- data/lib/action_view/template/handlers/erb/erubi.rb +9 -7
- data/lib/action_view/template/handlers/erb.rb +10 -14
- data/lib/action_view/template/handlers.rb +0 -26
- data/lib/action_view/template/html.rb +1 -11
- data/lib/action_view/template/raw_file.rb +0 -3
- data/lib/action_view/template/renderable.rb +24 -0
- data/lib/action_view/template/resolver.rb +82 -40
- data/lib/action_view/template/text.rb +0 -3
- data/lib/action_view/template.rb +9 -49
- data/lib/action_view/test_case.rb +18 -25
- data/lib/action_view/testing/resolvers.rb +10 -31
- data/lib/action_view/unbound_template.rb +3 -3
- data/lib/action_view/view_paths.rb +34 -36
- data/lib/action_view.rb +4 -1
- data/lib/assets/compiled/rails-ujs.js +2 -2
- metadata +14 -11
@@ -4,9 +4,9 @@ require "concurrent/map"
|
|
4
4
|
|
5
5
|
module ActionView
|
6
6
|
class UnboundTemplate
|
7
|
-
def initialize(source,
|
7
|
+
def initialize(source, identifier, handler, options)
|
8
8
|
@source = source
|
9
|
-
@
|
9
|
+
@identifier = identifier
|
10
10
|
@handler = handler
|
11
11
|
@options = options
|
12
12
|
|
@@ -22,7 +22,7 @@ module ActionView
|
|
22
22
|
options = @options.merge(locals: locals)
|
23
23
|
Template.new(
|
24
24
|
@source,
|
25
|
-
@
|
25
|
+
@identifier,
|
26
26
|
@handler,
|
27
27
|
**options
|
28
28
|
)
|
@@ -28,6 +28,40 @@ module ActionView
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
+
# Append a path to the list of view paths for this controller.
|
32
|
+
#
|
33
|
+
# ==== Parameters
|
34
|
+
# * <tt>path</tt> - If a String is provided, it gets converted into
|
35
|
+
# the default view path. You may also provide a custom view path
|
36
|
+
# (see ActionView::PathSet for more information)
|
37
|
+
def append_view_path(path)
|
38
|
+
self._view_paths = view_paths + Array(path)
|
39
|
+
end
|
40
|
+
|
41
|
+
# Prepend a path to the list of view paths for this controller.
|
42
|
+
#
|
43
|
+
# ==== Parameters
|
44
|
+
# * <tt>path</tt> - If a String is provided, it gets converted into
|
45
|
+
# the default view path. You may also provide a custom view path
|
46
|
+
# (see ActionView::PathSet for more information)
|
47
|
+
def prepend_view_path(path)
|
48
|
+
self._view_paths = ActionView::PathSet.new(Array(path) + view_paths)
|
49
|
+
end
|
50
|
+
|
51
|
+
# A list of all of the default view paths for this controller.
|
52
|
+
def view_paths
|
53
|
+
_view_paths
|
54
|
+
end
|
55
|
+
|
56
|
+
# Set the view paths.
|
57
|
+
#
|
58
|
+
# ==== Parameters
|
59
|
+
# * <tt>paths</tt> - If a PathSet is provided, use that;
|
60
|
+
# otherwise, process the parameter into a PathSet.
|
61
|
+
def view_paths=(paths)
|
62
|
+
self._view_paths = ActionView::PathSet.new(Array(paths))
|
63
|
+
end
|
64
|
+
|
31
65
|
private
|
32
66
|
# Override this method in your controller if you want to change paths prefixes for finding views.
|
33
67
|
# Prefixes defined here will still be added to parents' <tt>._prefixes</tt>.
|
@@ -88,41 +122,5 @@ module ActionView
|
|
88
122
|
def prepend_view_path(path)
|
89
123
|
lookup_context.view_paths.unshift(*path)
|
90
124
|
end
|
91
|
-
|
92
|
-
module ClassMethods
|
93
|
-
# Append a path to the list of view paths for this controller.
|
94
|
-
#
|
95
|
-
# ==== Parameters
|
96
|
-
# * <tt>path</tt> - If a String is provided, it gets converted into
|
97
|
-
# the default view path. You may also provide a custom view path
|
98
|
-
# (see ActionView::PathSet for more information)
|
99
|
-
def append_view_path(path)
|
100
|
-
self._view_paths = view_paths + Array(path)
|
101
|
-
end
|
102
|
-
|
103
|
-
# Prepend a path to the list of view paths for this controller.
|
104
|
-
#
|
105
|
-
# ==== Parameters
|
106
|
-
# * <tt>path</tt> - If a String is provided, it gets converted into
|
107
|
-
# the default view path. You may also provide a custom view path
|
108
|
-
# (see ActionView::PathSet for more information)
|
109
|
-
def prepend_view_path(path)
|
110
|
-
self._view_paths = ActionView::PathSet.new(Array(path) + view_paths)
|
111
|
-
end
|
112
|
-
|
113
|
-
# A list of all of the default view paths for this controller.
|
114
|
-
def view_paths
|
115
|
-
_view_paths
|
116
|
-
end
|
117
|
-
|
118
|
-
# Set the view paths.
|
119
|
-
#
|
120
|
-
# ==== Parameters
|
121
|
-
# * <tt>paths</tt> - If a PathSet is provided, use that;
|
122
|
-
# otherwise, process the parameter into a PathSet.
|
123
|
-
def view_paths=(paths)
|
124
|
-
self._view_paths = ActionView::PathSet.new(Array(paths))
|
125
|
-
end
|
126
|
-
end
|
127
125
|
end
|
128
126
|
end
|
data/lib/action_view.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#--
|
4
|
-
# Copyright (c) 2004-
|
4
|
+
# Copyright (c) 2004-2022 David Heinemeier Hansson
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining
|
7
7
|
# a copy of this software and associated documentation files (the
|
@@ -51,6 +51,8 @@ module ActionView
|
|
51
51
|
autoload :Renderer
|
52
52
|
autoload :AbstractRenderer
|
53
53
|
autoload :PartialRenderer
|
54
|
+
autoload :CollectionRenderer
|
55
|
+
autoload :ObjectRenderer
|
54
56
|
autoload :TemplateRenderer
|
55
57
|
autoload :StreamingTemplateRenderer
|
56
58
|
end
|
@@ -58,6 +60,7 @@ module ActionView
|
|
58
60
|
autoload_at "action_view/template/resolver" do
|
59
61
|
autoload :Resolver
|
60
62
|
autoload :PathResolver
|
63
|
+
autoload :FileSystemResolver
|
61
64
|
autoload :OptimizedFileSystemResolver
|
62
65
|
autoload :FallbackFileSystemResolver
|
63
66
|
end
|
@@ -16,8 +16,8 @@ Released under the MIT license
|
|
16
16
|
exclude: 'form button'
|
17
17
|
},
|
18
18
|
inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',
|
19
|
-
formSubmitSelector: 'form',
|
20
|
-
formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',
|
19
|
+
formSubmitSelector: 'form:not([data-turbo=true])',
|
20
|
+
formInputClickSelector: 'form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',
|
21
21
|
formDisableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',
|
22
22
|
formEnableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',
|
23
23
|
fileInputSelector: 'input[name][type=file]:not([disabled])',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionview
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 6.
|
19
|
+
version: 6.1.7.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 6.
|
26
|
+
version: 6.1.7.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: builder
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,28 +92,28 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - '='
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: 6.
|
95
|
+
version: 6.1.7.2
|
96
96
|
type: :development
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - '='
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 6.
|
102
|
+
version: 6.1.7.2
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: activemodel
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - '='
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 6.
|
109
|
+
version: 6.1.7.2
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - '='
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: 6.
|
116
|
+
version: 6.1.7.2
|
117
117
|
description: Simple, battle-tested conventions and helpers for building web pages.
|
118
118
|
email: david@loudthinking.com
|
119
119
|
executables: []
|
@@ -201,6 +201,8 @@ files:
|
|
201
201
|
- lib/action_view/railtie.rb
|
202
202
|
- lib/action_view/record_identifier.rb
|
203
203
|
- lib/action_view/renderer/abstract_renderer.rb
|
204
|
+
- lib/action_view/renderer/collection_renderer.rb
|
205
|
+
- lib/action_view/renderer/object_renderer.rb
|
204
206
|
- lib/action_view/renderer/partial_renderer.rb
|
205
207
|
- lib/action_view/renderer/partial_renderer/collection_caching.rb
|
206
208
|
- lib/action_view/renderer/renderer.rb
|
@@ -220,6 +222,7 @@ files:
|
|
220
222
|
- lib/action_view/template/html.rb
|
221
223
|
- lib/action_view/template/inline.rb
|
222
224
|
- lib/action_view/template/raw_file.rb
|
225
|
+
- lib/action_view/template/renderable.rb
|
223
226
|
- lib/action_view/template/resolver.rb
|
224
227
|
- lib/action_view/template/sources.rb
|
225
228
|
- lib/action_view/template/sources/file.rb
|
@@ -236,10 +239,10 @@ licenses:
|
|
236
239
|
- MIT
|
237
240
|
metadata:
|
238
241
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
239
|
-
changelog_uri: https://github.com/rails/rails/blob/v6.
|
240
|
-
documentation_uri: https://api.rubyonrails.org/v6.
|
242
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.1.7.2/actionview/CHANGELOG.md
|
243
|
+
documentation_uri: https://api.rubyonrails.org/v6.1.7.2/
|
241
244
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
242
|
-
source_code_uri: https://github.com/rails/rails/tree/v6.
|
245
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.1.7.2/actionview
|
243
246
|
rubygems_mfa_required: 'true'
|
244
247
|
post_install_message:
|
245
248
|
rdoc_options: []
|