This project is archived and is in readonly mode.
Add disable_with to button_to in a unobtrusive manner
Reported by PacoGuzman | June 28th, 2010 @ 11:26 AM
I've added a patch to use disable_with in the button_to helper in a unobtrusive manner.
See the patch
Comments and changes to this ticket
-
Jeff Kreeftmeijer October 10th, 2010 @ 08:43 AM
- Tag set to button_to, disable_with, patch
- Importance changed from to Low
-
Santiago Pastorino October 10th, 2010 @ 05:41 PM
The patch doesn't apply cleanly anymore. Rebase it please.
-
Jeff Kreeftmeijer October 11th, 2010 @ 08:22 AM
- State changed from new to open
+1
Patch applies cleanly and tests pass. :)
-
Santiago Pastorino October 11th, 2010 @ 02:07 PM
One more thing PacoGuzman, the patch needs docs because is a new feature.
Thanks and well done!!! -
PacoGuzman October 11th, 2010 @ 03:34 PM
Santiago, I think this is already documented.
http://github.com/rails/rails/blob/master/actionpack/lib/action_vie...
module ActionView
module Helpersmodule UrlHelper # <%= button_to('Destroy', 'http://www.example.com', :confirm => 'Are you sure?', # :method => "delete", :remote => true, :disable_with => 'loading...') %> # # => "<form class='button_to' method='post' action='http://www.example.com' data-remote='true'> # # <div> # # <input name='_method' value='delete' type='hidden' /> # # <input value='Destroy' type='submit' disable_with='loading...' data-confirm='Are you sure?' /> # # </div> # # </form>" # # def button_to(name, options = {}, html_options = {}) end end
end end
-
Repository October 11th, 2010 @ 04:25 PM
- State changed from open to committed
(from [31358d8c3c9309c3394d743bdaded29778fa060f]) data-disable-with in button_to helper
[#4993 state:committed]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
http://github.com/rails/rails/commit/31358d8c3c9309c3394d743bdaded2... -
Repository October 11th, 2010 @ 04:35 PM
(from [0c56a279266fe3b02304fa1c80062600380dd3a8]) data-disable-with in button_to helper
[#4993 state:committed]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
http://github.com/rails/rails/commit/0c56a279266fe3b02304fa1c800626...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 5544 Still exist bug with disable_with for button_to methos existad path disable_with https://rails.lighthouseapp.com...
- 5544 Still exist bug with disable_with for button_to methos Dupe: #4993
- 4993 Add disable_with to button_to in a unobtrusive manner [#4993 state:committed]
- 4993 Add disable_with to button_to in a unobtrusive manner [#4993 state:committed]