This project is archived and is in readonly mode.
Add disable_with to button_to in a unobtrusive manner
-
Voloshin Ruslan
Please add this path
-
Voloshin Ruslan
this bug existed in rails 3.0.0
-
Jeff Kreeftmeijer
- Tag set to button_to, disable_with, patch
- Importance changed from to Low
-
Santiago Pastorino
The patch doesn't apply cleanly anymore. Rebase it please.
-
PacoGuzman
Attached new patch. I've created the patch from master
-
Santiago Pastorino
One more thing PacoGuzman, the patch needs docs because is a new feature.
Thanks and well done!!! -
PacoGuzman
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 endend end
-
Repository
- State changed from open to committed
(from [31358d8c3c9309c3394d743bdaded29778fa060f]) data-disable-with in button_to helper
[#4993 Add disable_with to button_to in a unobtrusive manner state:committed]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
http://github.com/rails/rails/commit/31358d8c3c9309c3394d743bdaded2... -
Repository
(from [0c56a279266fe3b02304fa1c80062600380dd3a8]) data-disable-with in button_to helper
[#4993 Add disable_with to button_to in a unobtrusive manner state:committed]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
http://github.com/rails/rails/commit/0c56a279266fe3b02304fa1c800626...
