<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ohbarye</author_name>
  <author_url>https://blog.hatena.ne.jp/ohbarye/</author_url>
  <blog_title>valid,invalid</blog_title>
  <blog_url>https://ohbarye.hatenablog.jp/</blog_url>
  <categories>
    <anon>Ruby on Rails</anon>
  </categories>
  <description>form を submit する時に disabled されるボタンを re-enable するには $.rails.enableFormElements($form) を使う。 二重サブミット防止 まず、data 属性に disable_with を設定するとクリック時にボタンが disabled になり、二重 submit 防止になる。ラベルも disabled_with で指定したメッセージに置き換わる。 &lt;%= form_for @user do |f| %&gt; &lt;%= f.submit 'Submit', data: { disable_with: 'Submitting...' } …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fohbarye.hatenablog.jp%2Fentry%2F2017%2F08%2F25%2F005902&quot; title=&quot;Rails の form 内で disabled された submit ボタンを再度 enable する - valid,invalid&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-08-25 00:59:02</published>
  <title>Rails の form 内で disabled された submit ボタンを再度 enable する</title>
  <type>rich</type>
  <url>https://ohbarye.hatenablog.jp/entry/2017/08/25/005902</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
