From 741b291d660b298c0e39ce15e266f7d2cdfa8e2d Mon Sep 17 00:00:00 2001 From: Marc Baumbach Date: Wed, 6 Feb 2013 13:15:09 -0500 Subject: 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. --- actionpack/lib/action_view/helpers/url_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_view/helpers') 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 # # # # " # - # <%= button_to "New", action: "new", form_class: "new-thing" %> + # <%= button_to "New", { action: "new" }, form_class: "new-thing" %> # # => "
# #
# #
" # # - # <%= button_to "Create", action: "create", remote: true, form: { "data-type" => "json" } %> + # <%= button_to "Create", { action: "create" }, remote: true, form: { "data-type" => "json" } %> # # => "
# #
# # -- cgit v1.2.3 From 09d7eadbead132e77cce22ca9c0e76fa2a29c81a Mon Sep 17 00:00:00 2001 From: "Tim \"Roger\" Harvey" Date: Tue, 12 Feb 2013 13:57:20 -0800 Subject: Correct bullet content line wrapping The `:prefix` bullet content was not properly wrapping, dropping to the following line because the additional content was not indented properly. With this change, it will now display properly the way `:discard_type` does. --- actionpack/lib/action_view/helpers/date_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers') diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb index 61f939bff1..a989966613 100644 --- a/actionpack/lib/action_view/helpers/date_helper.rb +++ b/actionpack/lib/action_view/helpers/date_helper.rb @@ -13,7 +13,7 @@ module ActionView # elements. All of the select-type methods share a number of common options that are as follows: # # * :prefix - overwrites the default prefix of "date" used for the select names. So specifying "birthday" - # would give \birthday[month] instead of \date[month] if passed to the select_month method. + # would give \birthday[month] instead of \date[month] if passed to the select_month method. # * :include_blank - set to true if it should be possible to set an empty date. # * :discard_type - set to true if you want to discard the type part of the select name. If set to true, # the select_month method would use simply "date" (which can be overwritten using :prefix) instead -- cgit v1.2.3