@@ -453,16 +453,6 @@ def radio_button_tag(name, value, checked = false, options = {})
453
453
# * <tt>:disabled</tt> - If true, the user will not be able to use this input.
454
454
# * Any other key creates standard HTML options for the tag.
455
455
#
456
- # ==== Data attributes
457
- #
458
- # * <tt>confirm: 'question?'</tt> - If present the unobtrusive JavaScript
459
- # drivers will provide a prompt with the question specified. If the user accepts,
460
- # the form is processed normally, otherwise no action is taken.
461
- # * <tt>:disable_with</tt> - Value of this parameter will be used as the value for a
462
- # disabled version of the submit button when the form is submitted. This feature is
463
- # provided by the unobtrusive JavaScript driver. To disable this feature for a single submit tag
464
- # pass <tt>:data => { disable_with: false }</tt> Defaults to value attribute.
465
- #
466
456
# ==== Examples
467
457
# submit_tag
468
458
# # => <input name="commit" data-disable-with="Save changes" type="submit" value="Save changes" />
@@ -473,15 +463,28 @@ def radio_button_tag(name, value, checked = false, options = {})
473
463
# submit_tag "Save edits", disabled: true
474
464
# # => <input disabled="disabled" name="commit" data-disable-with="Save edits" type="submit" value="Save edits" />
475
465
#
476
- # submit_tag "Complete sale", data: { disable_with: "Submitting..." }
477
- # # => <input name="commit" data-disable-with="Submitting..." type="submit" value="Complete sale" />
478
- #
479
466
# submit_tag nil, class: "form_submit"
480
467
# # => <input class="form_submit" name="commit" type="submit" />
481
468
#
482
469
# submit_tag "Edit", class: "edit_button"
483
470
# # => <input class="edit_button" data-disable-with="Edit" name="commit" type="submit" value="Edit" />
484
471
#
472
+ # ==== Deprecated: Rails UJS attributes
473
+ #
474
+ # Prior to Rails 7, Rails shipped with the JavaScript library called @rails/ujs on by default. Following Rails 7,
475
+ # this library is no longer on by default. This library integrated with the following options:
476
+ #
477
+ # * <tt>confirm: 'question?'</tt> - If present the unobtrusive JavaScript
478
+ # drivers will provide a prompt with the question specified. If the user accepts,
479
+ # the form is processed normally, otherwise no action is taken.
480
+ # * <tt>:disable_with</tt> - Value of this parameter will be used as the value for a
481
+ # disabled version of the submit button when the form is submitted. This feature is
482
+ # provided by the unobtrusive JavaScript driver. To disable this feature for a single submit tag
483
+ # pass <tt>:data => { disable_with: false }</tt> Defaults to value attribute.
484
+ #
485
+ # submit_tag "Complete sale", data: { disable_with: "Submitting..." }
486
+ # # => <input name="commit" data-disable-with="Submitting..." type="submit" value="Complete sale" />
487
+ #
485
488
# submit_tag "Save", data: { confirm: "Are you sure?" }
486
489
# # => <input name='commit' type='submit' value='Save' data-disable-with="Save" data-confirm="Are you sure?" />
487
490
#
@@ -506,17 +509,6 @@ def submit_tag(value = "Save changes", options = {})
506
509
# use this input.
507
510
# * Any other key creates standard HTML options for the tag.
508
511
#
509
- # ==== Data attributes
510
- #
511
- # * <tt>confirm: 'question?'</tt> - If present, the
512
- # unobtrusive JavaScript drivers will provide a prompt with
513
- # the question specified. If the user accepts, the form is
514
- # processed normally, otherwise no action is taken.
515
- # * <tt>:disable_with</tt> - Value of this parameter will be
516
- # used as the value for a disabled version of the submit
517
- # button when the form is submitted. This feature is provided
518
- # by the unobtrusive JavaScript driver.
519
- #
520
512
# ==== Examples
521
513
# button_tag
522
514
# # => <button name="button" type="submit">Button</button>
@@ -537,6 +529,20 @@ def submit_tag(value = "Save changes", options = {})
537
529
# # <strong>Ask me!</strong>
538
530
# # </button>
539
531
#
532
+ # ==== Deprecated: Rails UJS attributes
533
+ #
534
+ # Prior to Rails 7, Rails shipped with a JavaScript library called @rails/ujs on by default. Following Rails 7,
535
+ # this library is no longer on by default. This library integrated with the following options:
536
+ #
537
+ # * <tt>confirm: 'question?'</tt> - If present, the
538
+ # unobtrusive JavaScript drivers will provide a prompt with
539
+ # the question specified. If the user accepts, the form is
540
+ # processed normally, otherwise no action is taken.
541
+ # * <tt>:disable_with</tt> - Value of this parameter will be
542
+ # used as the value for a disabled version of the submit
543
+ # button when the form is submitted. This feature is provided
544
+ # by the unobtrusive JavaScript driver.
545
+ #
540
546
# button_tag "Save", data: { confirm: "Are you sure?" }
541
547
# # => <button name="button" type="submit" data-confirm="Are you sure?">Save</button>
542
548
#
0 commit comments