aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/url_helper.rb
diff options
context:
space:
mode:
authorMarc Baumbach <marc.baumbach@gmail.com>2013-02-06 13:15:09 -0500
committerMarc Baumbach <marc.baumbach@gmail.com>2013-02-06 13:15:09 -0500
commit741b291d660b298c0e39ce15e266f7d2cdfa8e2d (patch)
treeca1af0e7e097fcad208d2db3ec3ae4c80874a503 /actionpack/lib/action_view/helpers/url_helper.rb
parent7290fb2eaaeb4dfc187cdc0b882a94f130900533 (diff)
downloadrails-741b291d660b298c0e39ce15e266f7d2cdfa8e2d.tar.gz
rails-741b291d660b298c0e39ce15e266f7d2cdfa8e2d.tar.bz2
rails-741b291d660b298c0e39ce15e266f7d2cdfa8e2d.zip
Fixing the examples for button_to
The examples do not generate the output they intend to due to not explicitly declaring the hash separations. This causes it to be treated as one parameter instead of the intended two parameters.
Diffstat (limited to 'actionpack/lib/action_view/helpers/url_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb
index 5e20b557d8..775d93ed39 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -241,13 +241,13 @@ module ActionView
# # </div>
# # </form>"
#
- # <%= button_to "New", action: "new", form_class: "new-thing" %>
+ # <%= button_to "New", { action: "new" }, form_class: "new-thing" %>
# # => "<form method="post" action="/controller/new" class="new-thing">
# # <div><input value="New" type="submit" /></div>
# # </form>"
#
#
- # <%= button_to "Create", action: "create", remote: true, form: { "data-type" => "json" } %>
+ # <%= button_to "Create", { action: "create" }, remote: true, form: { "data-type" => "json" } %>
# # => "<form method="post" action="/images/create" class="button_to" data-remote="true" data-type="json">
# # <div>
# # <input value="Create" type="submit" />