title: How do I setup a error_message_on for a field that is part of a fields_for sub-form
body: <p>I have a one to many relationship with a child form that is nested using a fields_for operation. </p>
  
  <p>I want to use the built in rails error handling to show error messages on the children using the error_message_on method.</p>
  
  <p>Example:</p>
  
  <pre><code>      &lt;% form_for @business, :url =&gt; {:action =&gt; :page, :page =&gt; @page}, :html =&gt; {:method =&gt; :put } do |f| -%&gt;
          &lt;h5&gt;&lt;strong&gt;More Details&lt;/strong&gt;&lt;/h5&gt;
          &lt;div class="clear"&gt;&lt;/div&gt;
          &lt;div class="col-1"&gt;
            &lt;label for="hours"&gt;Hours&lt;/label&gt;
            &lt;table class="hours"&gt;
              &lt;tbody&gt;
                &lt;% f.fields_for :hours do |hours_form| %&gt;
                &lt;tr&gt;
                  &lt;td&gt;&lt;%= hours_form.label :day, hours_form.object.day %&gt;:&lt;%= hours_form.hidden_field :day %&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;%= hours_form.text_field :open_time, :class =&gt; 'input' %&gt;&lt;/td&gt;
                  &lt;td&gt;to&lt;/td&gt;
                  &lt;td&gt;&lt;%= hours_form.text_field :close_time, :class =&gt; 'input' %&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;%= hours_form.check_box :closed %&gt;&lt;/td&gt;
                  &lt;td class="c6"&gt;&lt;%= hours_form.label :closed, 'Closed this day' %&gt;
                  &lt;%= hours_form.error_message_on :open_time, :css_class =&gt; 'cant-be-blank' %&gt;
                  &lt;%= hours_form.error_message_on :close_time, :css_class =&gt; 'cant-be-blank' %&gt;&lt;/td&gt;
                &lt;/tr&gt;
                &lt;% end -%&gt;
              &lt;/tbody&gt;
            &lt;/table&gt;
  ...
  </code></pre>