From 3f65e7f7be92adfb2d89ec23ef28a96d2bfae294 Mon Sep 17 00:00:00 2001 From: Will Farrington Date: Sat, 10 Dec 2011 23:53:39 -0500 Subject: Add button_tag support to ActionView::Helpers::FormBuilder. This support is near-identical to the existing submit_tag support. Example: <%= form_for @post do |f| %> <%= f.button %> <% end %> --- actionpack/test/template/form_helper_test.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack/test/template/form_helper_test.rb') diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 41e925b000..73b936b16e 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -689,6 +689,7 @@ class FormHelperTest < ActionView::TestCase concat f.text_area(:body) concat f.check_box(:secret) concat f.submit('Create post') + concat f.button('Create post') end expected = whole_form("/posts/123", "create-post" , "edit_post", :method => "put") do @@ -697,7 +698,8 @@ class FormHelperTest < ActionView::TestCase "" + "" + "" + - "" + "" + + "" end assert_dom_equal expected, output_buffer -- cgit v1.2.3