From d2fb072563ff54109ecfec0119a192c8a9071889 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 3 May 2005 14:30:53 +0000 Subject: Added FormTagHelper#image_submit_tag for making submit buttons that uses images git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1280 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/form_tag_helper.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionpack/lib/action_view/helpers/form_tag_helper.rb') diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index d8535d2870..126a407cad 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -79,6 +79,10 @@ module ActionView tag("input", { "type" => "submit", "name" => "submit", "value" => value }.update(convert_options(options))) end + def image_submit_tag(source, options = {}) + tag("input", { "type" => "image", "src" => image_path(source) }.update(convert_options(options))) + end + private def convert_options(options) options = options.stringify_keys -- cgit v1.2.3