gpt4 book ai didi

ruby-on-rails-3 - 导轨 3 : In submit button :disable_with is not working

转载 作者:行者123 更新时间:2023-12-05 01:15:23 25 4
gpt4 key购买 nike

在以下代码中:disable_with 在 rails 3 中不起作用。但它在 rails 2.2 中完美运行

这段代码有什么问题?

<%= submit_tag "Save", :class => "buttons",
:disable_with => "Processing",
:id => 'save_btn' %>

最佳答案

从版本 3.2.5 开始你不应该使用 :disable_with。

<%= submit_tag "Save", 'data-disable-with' => "Processing", :class => "buttons", :id => 'save_btn' %>

<%= submit_tag "Save", data: { disable_with: "Processing" }, :class => "buttons", :id => 'save_btn' %>

关于ruby-on-rails-3 - 导轨 3 : In submit button :disable_with is not working,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14228753/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com