aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/form_helper.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-05-15 09:08:40 +0200
committerJosé Valim <jose.valim@gmail.com>2010-05-15 09:08:40 +0200
commitd18a2742e01d195eb2d228207062aff49f7eb854 (patch)
treebda97721b4410a221bd3405a440931f6f2de1869 /actionpack/lib/action_view/helpers/form_helper.rb
parent6e69b42b21d8e76c4d87b6fbc4222f55d3b11a06 (diff)
downloadrails-d18a2742e01d195eb2d228207062aff49f7eb854.tar.gz
rails-d18a2742e01d195eb2d228207062aff49f7eb854.tar.bz2
rails-d18a2742e01d195eb2d228207062aff49f7eb854.zip
Improve previous patch a bit [#3645 state:resolved]
Diffstat (limited to 'actionpack/lib/action_view/helpers/form_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 557f8454be..932e9e2f95 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -576,12 +576,12 @@ module ActionView
# label(:post, :terms) do
# 'Accept <a href="/terms">Terms</a>.'
# end
- def label(object_name, method, content_or_options_with_block = nil, options = nil, &block)
+ def label(object_name, method, content_or_options = nil, options = nil, &block)
if block_given?
- options = content_or_options_with_block if content_or_options_with_block.is_a?(Hash)
+ options = content_or_options if content_or_options.is_a?(Hash)
text = nil
else
- text = content_or_options_with_block
+ text = content_or_options
end
options ||= {}