<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -6,31 +6,47 @@ module Merb
           id = (object_symbol==nil) ? attribute.to_s : &quot;#{object_symbol}_#{attribute}&quot;
           name = (object_symbol==nil) ? attribute.to_s : &quot;#{object_symbol}[#{attribute}]&quot;
 
-          label = values.delete(:label) || humanize_symbol(attribute)
+          if values.keys.include?(:label)
+            label = values.delete(:label)
+          else
+            label = humanize_symbol(attribute)
+          end
+          after_text = values.delete(:after) 
+          
           # check if the object is here and the method is public
-          value = (values.delete(:value) || ((object==nil) ? nil : (object.public_methods.include?(attribute.to_s) ? object.send(attribute) : nil)))
+          
           control = values.delete(:control)
+          html = error_message = ''
           
-          html = ''
-          if self.negative_captcha_form?
-            html = negative_control(control, values.merge({:id =&gt; id, :name =&gt; name, :value =&gt; value}))
-          else
-            if self.respond_to?(&quot;control_#{control}&quot;)
-              html = self.send(&quot;control_#{control}&quot;, values.merge({:id =&gt; id, :name =&gt; name, :value =&gt; value}))    
+          if (control)
+            value = (values.delete(:value) || ((object==nil) ? nil : (object.public_methods.include?(attribute.to_s) ? object.send(attribute) : nil)))
+          
+            if self.negative_captcha_form?
+              html = negative_control(control, values.merge({:id =&gt; id, :name =&gt; name, :value =&gt; value}))
             else
-              html = &quot;unknown control #{control.inspect}&quot;
+              if self.respond_to?(&quot;control_#{control}&quot;)
+                html = self.send(&quot;control_#{control}&quot;, values.merge({:id =&gt; id, :name =&gt; name, :value =&gt; value}))    
+              else
+                html = &quot;unknown control #{control.inspect}&quot;
+              end
             end
-          end
           
-          error_message = &quot;&quot;
-          if object!=nil and object.errors and object.errors.on(attribute) and object.errors.on(attribute).size &gt; 0
-            object.errors.on(attribute).each do |error|
-              error_message &lt;&lt; tag(:div, error)
+            if object!=nil and object.errors and object.errors.on(attribute) and object.errors.on(attribute).size &gt; 0
+              object.errors.on(attribute).each do |error|
+                error_message &lt;&lt; tag(:div, error)
+              end
+              error_message = tag(:div, error_message, :class =&gt; 'errors')
             end
-            error_message = tag(:div, error_message, :class =&gt; 'errors')
           end
-
-          html = tag(:label, label+&quot;:&quot;, :for =&gt; id) + html
+          
+          if label
+            html = tag(:label, label+&quot;:&quot;, :for =&gt; id) + html
+          end
+          
+          if after_text
+            html = html + &quot; &quot; + after_text
+          end
+          
           tag(:div, html, :class =&gt; &quot;row #{values[:control]} #{error_message!='' ? 'has_errors' : ''}&quot;) + error_message
         end
         
@@ -59,7 +75,7 @@ module Merb
         alias_method :control_file, :control_file_field
         
         def control_select(options={})
-          options[:selected] = options.delete(:value)
+          options[:selected] = options.delete(:value).to_s
           select(options)
         end
         </diff>
      <filename>lib/merb-simple-forms/controls.rb</filename>
    </modified>
    <modified>
      <diff>@@ -52,7 +52,7 @@ module Merb
         if cancel_url.nil? &amp;&amp; object_symbol
           if namespace.nil? || namespace.empty?
             if nested_within and parent
-              cancel_url = resource(parent, object_symbol.to_s.pluralize.intern)
+              cancel_url = resource(parent, (form_definition[:route_name] || object_symbol.to_s.pluralize.intern))
             else
               cancel_url = url(object_symbol.to_s.pluralize.intern)
             end
@@ -92,7 +92,7 @@ module Merb
             if namespace
               url(&quot;#{namespace}_#{nested_within.singular}_#{route_name}&quot;.intern, (nested_within.to_s.singularize + &quot;_id&quot;).intern =&gt; ( (parent.respond_to?(:slug) &amp;&amp; !disable_slug)  ? parent.slug : parent.id))
             else
-              resource(parent, route_name.intern)
+              resource(parent, (route_name.class == Symbol ? route_name : route_name.intern))
             end
           else
             route_name ||= object.class.storage_name.singular</diff>
      <filename>lib/merb-simple-forms/simple-forms-helpers.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a27c0630fa3cf3d757a1992b0d50b8f91e09c82d</id>
    </parent>
  </parents>
  <author>
    <name>Maxime Guilbot</name>
    <email>maxime@ekohe.com</email>
  </author>
  <url>http://github.com/maxime/merb-simple-forms/commit/1c249b37e466342003416b4d99da6fb7c77108f5</url>
  <id>1c249b37e466342003416b4d99da6fb7c77108f5</id>
  <committed-date>2009-05-16T09:09:55-07:00</committed-date>
  <authored-date>2009-05-16T09:09:55-07:00</authored-date>
  <message>Added support of the :after_text option (useful for check boxes)
Some route fixing</message>
  <tree>af068f807a24bc8ba70f4912e2eaf9c37f759d37</tree>
  <committer>
    <name>Maxime Guilbot</name>
    <email>maxime@ekohe.com</email>
  </committer>
</commit>
