diff options
author | Alexey Vakhov <vakhov@gmail.com> | 2012-04-01 10:30:31 +0400 |
---|---|---|
committer | Alexey Vakhov <vakhov@gmail.com> | 2012-04-01 10:30:31 +0400 |
commit | 806f4d8af078884db3b68facb4c04560d449b9eb (patch) | |
tree | 7cef3eac2a28a49cc474d4a14dd9b0f1c024ea62 | |
parent | 889bb4b786941fa2e73163e0b0de10175a999526 (diff) | |
download | rails-806f4d8af078884db3b68facb4c04560d449b9eb.tar.gz rails-806f4d8af078884db3b68facb4c04560d449b9eb.tar.bz2 rails-806f4d8af078884db3b68facb4c04560d449b9eb.zip |
Small #label method refactoring, thanks @rafaelfranca
-rw-r--r-- | actionpack/lib/action_view/helpers/tags/label.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/tags/label.rb b/actionpack/lib/action_view/helpers/tags/label.rb index ee97f8759b..16135fcd5a 100644 --- a/actionpack/lib/action_view/helpers/tags/label.rb +++ b/actionpack/lib/action_view/helpers/tags/label.rb @@ -34,7 +34,6 @@ module ActionView if block_given? content = @template_object.capture(&block) - label_tag(name_and_id["id"], content, options) else content = if @content.blank? @object_name.gsub!(/\[(.*)_attributes\]\[\d\]/, '.\1') @@ -56,9 +55,9 @@ module ActionView end content ||= @method_name.humanize - - label_tag(name_and_id["id"], content, options) end + + label_tag(name_and_id["id"], content, options) end end end |