diff options
author | Marc Baumbach <marc.baumbach@gmail.com> | 2013-02-06 13:15:09 -0500 |
---|---|---|
committer | Marc Baumbach <marc.baumbach@gmail.com> | 2013-02-06 13:15:09 -0500 |
commit | 741b291d660b298c0e39ce15e266f7d2cdfa8e2d (patch) | |
tree | ca1af0e7e097fcad208d2db3ec3ae4c80874a503 /actionpack/lib | |
parent | 7290fb2eaaeb4dfc187cdc0b882a94f130900533 (diff) | |
download | rails-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')
-rw-r--r-- | actionpack/lib/action_view/helpers/url_helper.rb | 4 |
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" /> |