From e0b904e74f242dea9427f9b8aa7d3a7e27e94b93 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 24 Nov 2004 01:15:16 +0000 Subject: Allow form_tag with no arguments (resulting in a form posting to current action) - Patch #236 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_view/helpers/tag_helper.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack') diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index a422af3f0e..2da77a2144 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *CVS* +* Added the choice to call form_tag with no arguments (resulting in a form posting to current action) [bitsweat] + * Upgraded to Builder 1.2.1 * Added :module as an alias for :controller_prefix to url_for and friends, so you can do redirect_to(:module => "shop", :controller => "purchases") diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb index 90084c7a8d..dc71826614 100644 --- a/actionpack/lib/action_view/helpers/tag_helper.rb +++ b/actionpack/lib/action_view/helpers/tag_helper.rb @@ -23,7 +23,7 @@ module ActionView # Starts a form tag that points the action to an url configured with url_for_options just like # ActionController::Base#url_for. - def form_tag(url_for_options, options = {}, *parameters_for_url) + def form_tag(url_for_options = {}, options = {}, *parameters_for_url) html_options = { "method" => "POST" }.merge(options) if html_options[:multipart] -- cgit v1.2.3