aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-01-29 20:42:46 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-01-29 20:42:46 +0000
commit6b5238aadeb778a7067f93376a6a57a8eeda8379 (patch)
tree47a9f5560403ee8df71091ab2066797784c1a502 /actionpack/lib/action_view
parent09c708981ce058fe9b1cbead4fac9fbb58de6a97 (diff)
downloadrails-6b5238aadeb778a7067f93376a6a57a8eeda8379.tar.gz
rails-6b5238aadeb778a7067f93376a6a57a8eeda8379.tar.bz2
rails-6b5238aadeb778a7067f93376a6a57a8eeda8379.zip
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
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb4
1 files changed, 4 insertions, 0 deletions
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