aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/ajax_on_rails.textile
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-05-15 10:06:27 +0200
committerJosé Valim <jose.valim@gmail.com>2012-05-15 10:08:51 +0200
commitdd42e8905830f96db29d49ed4bd44eeca5195de3 (patch)
treeccfe23003e59dbba9e3f73f0b3ea0e1bad691eb1 /guides/source/ajax_on_rails.textile
parenta5c38a9c087e33d36397afc496be7c8e01b37ef0 (diff)
downloadrails-dd42e8905830f96db29d49ed4bd44eeca5195de3.tar.gz
rails-dd42e8905830f96db29d49ed4bd44eeca5195de3.tar.bz2
rails-dd42e8905830f96db29d49ed4bd44eeca5195de3.zip
Revert "Revert "Remove `:disable_with` in favor of `'data-disable-with'` option from `submit_tag`, `button_tag` and `button_to` helpers.""
Finally remove `:disable_with` but use `:data => { :disable_with => ... }` in examples to show off a better API (which looks nicer in Ruby 1.9) This reverts commit a5c38a9c087e33d36397afc496be7c8e01b37ef0.
Diffstat (limited to 'guides/source/ajax_on_rails.textile')
-rw-r--r--guides/source/ajax_on_rails.textile4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/ajax_on_rails.textile b/guides/source/ajax_on_rails.textile
index cda9c64460..bfd007490a 100644
--- a/guides/source/ajax_on_rails.textile
+++ b/guides/source/ajax_on_rails.textile
@@ -78,7 +78,7 @@ will produce
<ruby>
button_to('Destroy', 'http://www.example.com', :confirm => 'Are you sure?',
- :method => "delete", :remote => true, :disable_with => 'loading...')
+ :method => "delete", :remote => true, 'data-disable-with' => 'loading...')
</ruby>
will produce
@@ -87,7 +87,7 @@ will produce
<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?' />
+ <input value='Destroy' type='submit' data-disable-with='loading...' data-confirm='Are you sure?' />
</div>
</form>
</html>