From d18a2742e01d195eb2d228207062aff49f7eb854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 15 May 2010 09:08:40 +0200 Subject: Improve previous patch a bit [#3645 state:resolved] --- actionpack/lib/action_view/helpers/form_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_view/helpers/form_helper.rb') 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 Terms.' # 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 ||= {} -- cgit v1.2.3