actionview 7.0.0 → 7.0.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of actionview might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/MIT-LICENSE +1 -1
- data/lib/action_view/gem_version.rb +1 -1
- data/lib/action_view/helpers/date_helper.rb +1 -1
- data/lib/action_view/helpers/form_tag_helper.rb +4 -4
- data/lib/action_view/helpers/url_helper.rb +12 -10
- data/lib/action_view.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0499866fc1d0b55328f83d86a26025ca2be3d35e194161818e9dc95e853ff51
|
4
|
+
data.tar.gz: 31312e3b52e679c085b2c0b87f2096824d2bcd049057e9ad86ad5d906f41ebd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17d1b29ecd9d8739db10542273eb562318a5063aead96ab19e37954b9f57733ab94125873c91e4ae6f57ef960b27b2cb3b40eff4316e6f27a9ce78ae318b7b3b
|
7
|
+
data.tar.gz: d8de46c0a31feb9d151de912d7129747f7baa3d30586840c3b898b8c91493baa00f6bd003e75e686dcba70a382ccacdc64a5626dbdee19d0e4a29c7159300e6f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
## Rails 7.0.1 (January 06, 2022) ##
|
2
|
+
|
3
|
+
* Fix `button_to` to work with a hash parameter as URL.
|
4
|
+
|
5
|
+
*MingyuanQin*
|
6
|
+
|
7
|
+
* Fix `link_to` with a model passed as an argument twice.
|
8
|
+
|
9
|
+
*Alex Ghiculescu*
|
10
|
+
|
11
|
+
|
1
12
|
## Rails 7.0.0 (December 15, 2021) ##
|
2
13
|
|
3
14
|
* Support `include_hidden:` option in calls to
|
data/MIT-LICENSE
CHANGED
@@ -1149,7 +1149,7 @@ module ActionView
|
|
1149
1149
|
|
1150
1150
|
# Builds hidden input tag for date part and value.
|
1151
1151
|
# build_hidden(:year, 2008)
|
1152
|
-
# => "<input id="
|
1152
|
+
# => "<input type="hidden" id="date_year" name="date[year]" value="2008" autocomplete="off" />"
|
1153
1153
|
def build_hidden(type, value)
|
1154
1154
|
select_options = {
|
1155
1155
|
type: "hidden",
|
@@ -294,14 +294,14 @@ module ActionView
|
|
294
294
|
#
|
295
295
|
# ==== Examples
|
296
296
|
# hidden_field_tag 'tags_list'
|
297
|
-
# # => <input
|
297
|
+
# # => <input type="hidden" name="tags_list" id="tags_list" autocomplete="off" />
|
298
298
|
#
|
299
299
|
# hidden_field_tag 'token', 'VUBJKB23UIVI1UU1VOBVI@'
|
300
|
-
# # => <input
|
300
|
+
# # => <input type="hidden" name="token" id="token" value="VUBJKB23UIVI1UU1VOBVI@" autocomplete="off" />
|
301
301
|
#
|
302
302
|
# hidden_field_tag 'collected_input', '', onchange: "alert('Input collected!')"
|
303
|
-
# # => <input
|
304
|
-
#
|
303
|
+
# # => <input type="hidden" name="collected_input" id="collected_input"
|
304
|
+
# value="" onchange="alert('Input collected!')" autocomplete="off" />
|
305
305
|
def hidden_field_tag(name, value = nil, options = {})
|
306
306
|
text_field_tag(name, value, options.merge(type: :hidden, autocomplete: "off"))
|
307
307
|
end
|
@@ -276,20 +276,20 @@ module ActionView
|
|
276
276
|
# <%= button_to "New", action: "new" %>
|
277
277
|
# # => "<form method="post" action="/controller/new" class="button_to">
|
278
278
|
# # <button type="submit">New</button>
|
279
|
-
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6"/>
|
279
|
+
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6" autocomplete="off"/>
|
280
280
|
# # </form>"
|
281
281
|
#
|
282
282
|
# <%= button_to "New", new_article_path %>
|
283
283
|
# # => "<form method="post" action="/articles/new" class="button_to">
|
284
284
|
# # <button type="submit">New</button>
|
285
|
-
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6"/>
|
285
|
+
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6" autocomplete="off"/>
|
286
286
|
# # </form>"
|
287
287
|
#
|
288
288
|
# <%= button_to "New", new_article_path, params: { time: Time.now } %>
|
289
289
|
# # => "<form method="post" action="/articles/new" class="button_to">
|
290
290
|
# # <button type="submit">New</button>
|
291
291
|
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6"/>
|
292
|
-
# # <input type="hidden" name="time" value="2021-04-08 14:06:09 -0500">
|
292
|
+
# # <input type="hidden" name="time" value="2021-04-08 14:06:09 -0500" autocomplete="off">
|
293
293
|
# # </form>"
|
294
294
|
#
|
295
295
|
# <%= button_to [:make_happy, @user] do %>
|
@@ -299,19 +299,19 @@ module ActionView
|
|
299
299
|
# # <button type="submit">
|
300
300
|
# # Make happy <strong><%= @user.name %></strong>
|
301
301
|
# # </button>
|
302
|
-
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6"/>
|
302
|
+
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6" autocomplete="off"/>
|
303
303
|
# # </form>"
|
304
304
|
#
|
305
305
|
# <%= button_to "New", { action: "new" }, form_class: "new-thing" %>
|
306
306
|
# # => "<form method="post" action="/controller/new" class="new-thing">
|
307
307
|
# # <button type="submit">New</button>
|
308
|
-
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6"/>
|
308
|
+
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6" autocomplete="off"/>
|
309
309
|
# # </form>"
|
310
310
|
#
|
311
311
|
# <%= button_to "Create", { action: "create" }, remote: true, form: { "data-type" => "json" } %>
|
312
312
|
# # => "<form method="post" action="/images/create" class="button_to" data-remote="true" data-type="json">
|
313
313
|
# # <button type="submit">Create</button>
|
314
|
-
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6"/>
|
314
|
+
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6" autocomplete="off"/>
|
315
315
|
# # </form>"
|
316
316
|
#
|
317
317
|
# <%= button_to "Delete Image", { action: "delete", id: @image.id },
|
@@ -319,7 +319,7 @@ module ActionView
|
|
319
319
|
# # => "<form method="post" action="/images/delete/1" class="button_to">
|
320
320
|
# # <input type="hidden" name="_method" value="delete" />
|
321
321
|
# # <button data-confirm='Are you sure?' type="submit">Delete Image</button>
|
322
|
-
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6"/>
|
322
|
+
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6" autocomplete="off"/>
|
323
323
|
# # </form>"
|
324
324
|
#
|
325
325
|
# <%= button_to('Destroy', 'http://www.example.com',
|
@@ -327,7 +327,7 @@ module ActionView
|
|
327
327
|
# # => "<form class='button_to' method='post' action='http://www.example.com' data-remote='true'>
|
328
328
|
# # <input name='_method' value='delete' type='hidden' />
|
329
329
|
# # <button type='submit' data-disable-with='loading...' data-confirm='Are you sure?'>Destroy</button>
|
330
|
-
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6"/>
|
330
|
+
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6" autocomplete="off"/>
|
331
331
|
# # </form>"
|
332
332
|
# #
|
333
333
|
def button_to(name = nil, options = nil, html_options = nil, &block)
|
@@ -366,7 +366,9 @@ module ActionView
|
|
366
366
|
html_options = convert_options_to_data_attributes(options, html_options)
|
367
367
|
html_options["type"] = "submit"
|
368
368
|
|
369
|
-
button = if block_given?
|
369
|
+
button = if block_given?
|
370
|
+
content_tag("button", html_options, &block)
|
371
|
+
elsif button_to_generates_button_tag
|
370
372
|
content_tag("button", name || url, html_options, &block)
|
371
373
|
else
|
372
374
|
html_options["value"] = name || url
|
@@ -743,7 +745,7 @@ module ActionView
|
|
743
745
|
end
|
744
746
|
|
745
747
|
def url_target(name, options)
|
746
|
-
if name.respond_to?(:model_name) && options.empty?
|
748
|
+
if name.respond_to?(:model_name) && options.is_a?(Hash) && options.empty?
|
747
749
|
url_for(name)
|
748
750
|
else
|
749
751
|
url_for(options)
|
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
|
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: 7.0.
|
4
|
+
version: 7.0.1
|
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:
|
11
|
+
date: 2022-01-06 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: 7.0.
|
19
|
+
version: 7.0.1
|
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: 7.0.
|
26
|
+
version: 7.0.1
|
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: 7.0.
|
95
|
+
version: 7.0.1
|
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: 7.0.
|
102
|
+
version: 7.0.1
|
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: 7.0.
|
109
|
+
version: 7.0.1
|
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: 7.0.
|
116
|
+
version: 7.0.1
|
117
117
|
description: Simple, battle-tested conventions and helpers for building web pages.
|
118
118
|
email: david@loudthinking.com
|
119
119
|
executables: []
|
@@ -246,10 +246,10 @@ licenses:
|
|
246
246
|
- MIT
|
247
247
|
metadata:
|
248
248
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
249
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.0.
|
250
|
-
documentation_uri: https://api.rubyonrails.org/v7.0.
|
249
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.0.1/actionview/CHANGELOG.md
|
250
|
+
documentation_uri: https://api.rubyonrails.org/v7.0.1/
|
251
251
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
252
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.0.
|
252
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.0.1/actionview
|
253
253
|
rubygems_mfa_required: 'true'
|
254
254
|
post_install_message:
|
255
255
|
rdoc_options: []
|