diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2012-03-27 16:15:11 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2012-03-27 16:15:11 -0700 |
commit | da5f65676e4e6f9ac38a3bd0003cf3b1308ff0ea (patch) | |
tree | edd0cf871e86294dfbe12afe1f45c166e3501b3a /actionpack/lib | |
parent | 33164c8f1479b826a044ab90f4cc2439666e4b16 (diff) | |
parent | 32763a82444ba5eb711ec0e5d6380818e5f2695d (diff) | |
download | rails-da5f65676e4e6f9ac38a3bd0003cf3b1308ff0ea.tar.gz rails-da5f65676e4e6f9ac38a3bd0003cf3b1308ff0ea.tar.bz2 rails-da5f65676e4e6f9ac38a3bd0003cf3b1308ff0ea.zip |
Merge pull request #5621 from rafaelfranca/fix-2492-master
Fix label_tag to merge the options hash with the object hash
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/tags/label.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/tags/label.rb b/actionpack/lib/action_view/helpers/tags/label.rb index 1bd71c2778..1c8bf063ea 100644 --- a/actionpack/lib/action_view/helpers/tags/label.rb +++ b/actionpack/lib/action_view/helpers/tags/label.rb @@ -3,16 +3,16 @@ module ActionView module Tags class Label < Base #:nodoc: def initialize(object_name, method_name, template_object, content_or_options = nil, options = nil) + options ||= {} + content_is_options = content_or_options.is_a?(Hash) if content_is_options - options = content_or_options + options.merge! content_or_options @content = nil else @content = content_or_options end - options ||= {} - super(object_name, method_name, template_object, options) end |