From 6b5238aadeb778a7067f93376a6a57a8eeda8379 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 29 Jan 2007 20:42:46 +0000 Subject: Added FormBuilder#submit as a delegate for FormTagHelper#submit_tag [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6089 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/form_helper.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 84d1d8b670..71838c9d0b 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -453,6 +453,10 @@ module ActionView def error_messages(options = {}) @template.error_messages_for(@object_name, options) end + + def submit(value = "Save changes", options = {}) + @template.submit_tag(value, options.reverse_merge(:id => "#{object_name}_submit")) + end end end -- cgit v1.2.3