<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -287,22 +287,14 @@ module Merb::Helpers::Form::Builder
       super
     end
 
-    # Provides a generic HTML label.
-    #
-    # ==== Parameters
-    # attrs&lt;Hash&gt;:: HTML attributes
-    #
-    # ==== Returns
-    # String:: HTML
-    #
-    # ==== Example
-    #   &lt;%= label :for =&gt; &quot;name&quot;, :label =&gt; &quot;Full Name&quot; %&gt; 
-    #   =&gt; &lt;label for=&quot;name&quot;&gt;Full Name&lt;/label&gt;
-    def label(attrs)
-      attrs ||= {}
-      for_attr = attrs[:id] ? {:for =&gt; attrs[:id]} : {}
-      if label_text = attrs.delete(:label)
-        tag(:label, label_text, for_attr)
+    def label(contents, attrs = {})
+      if contents.is_a?(Hash)
+        attrs    = contents
+        contents = attrs.delete(:label)
+      end
+      if contents
+        for_attr = attrs[:id] ? {:for =&gt; attrs[:id]} : {}
+        tag(:label, contents, for_attr)
       else
         &quot;&quot;
       end</diff>
      <filename>merb_helpers/lib/merb_helpers/form/builder.rb</filename>
    </modified>
    <modified>
      <diff>@@ -149,6 +149,21 @@ module Merb::Helpers::Form
     end
   end
 
+  # Provides a generic HTML label.
+  #
+  # ==== Parameters
+  # attrs&lt;Hash&gt;:: HTML attributes
+  #
+  # ==== Returns
+  # String:: HTML
+  #
+  # ==== Example
+  #   &lt;%= label &quot;Full Name&quot;, :for =&gt; &quot;name&quot; %&gt; 
+  #   =&gt; &lt;label for=&quot;name&quot;&gt;Full Name&lt;/label&gt;
+  def label(*args)
+    current_form_context.label(*args)
+  end
+
   # Provides a HTML text input tag
   #
   # ==== Parameters</diff>
      <filename>merb_helpers/lib/merb_helpers/form/helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1011,6 +1011,15 @@ describe &quot;fieldset&quot; do
   end
 end
 
+describe &quot;label&quot; do
+  it_should_behave_like &quot;FakeController&quot;
+
+  it &quot;should render a label tag&quot; do
+    result = label(&quot;First Name&quot;, :id =&gt; &quot;user_first_name&quot;)
+    result.should match_tag(:label, :for =&gt; &quot;user_first_name&quot;, :content =&gt; &quot;First Name&quot;)
+  end
+end
+
 describe &quot;file_field&quot; do
   it_should_behave_like &quot;FakeController&quot;
 </diff>
      <filename>merb_helpers/spec/merb_helpers_form_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a269b9b92ca1fc4acc14dce60202fc8d8a6e2aa8</id>
    </parent>
  </parents>
  <author>
    <name>Michael Sheakoski</name>
    <email>michael@Michaels-iMac.local</email>
  </author>
  <url>http://github.com/wycats/merb-plugins/commit/91c5f336e898b06c0a811eb827f58c61d8c513da</url>
  <id>91c5f336e898b06c0a811eb827f58c61d8c513da</id>
  <committed-date>2008-09-05T17:00:29-07:00</committed-date>
  <authored-date>2008-09-05T17:00:29-07:00</authored-date>
  <message>Added a public #label helper. Specs provided by Bryan Ray. Closes #155</message>
  <tree>9003fe9a64abb51b2c6c302172fccdaaa67f99c0</tree>
  <committer>
    <name>Michael Sheakoski</name>
    <email>michael@Michaels-iMac.local</email>
  </committer>
</commit>
