Reputation: 11000
Maybe I misunderstood something..?
button_to signature:
button_to(name = nil, options = nil, html_options = nil, &block)
My button:
<%= button_to "Re-send pin", {action: "send_pin_again", :disabled => true} %>
is still enabled..
Upvotes: 0
Views: 2325
Reputation: 230471
Maybe I misunderstood something
Yes, disabled
is an html attribute.
There are a few special
html_options
:...
:disabled
- If set totrue
, it will generate a disabled button.
Place it in the corresponding argument.
<%= button_to "Re-send pin", {action: "send_pin_again"}, :disabled => true %>
Upvotes: 2