title: Rails 3.1 Select All checkbox
body: <p>this is my view:</p>
  
  <pre><code> @bulk_objects.each do |bulk_warehouse|
        bulk_error = @wh_errors[:"bulk_warehouse#{@count}"] if @wh_errors      
  -%&gt;
  &lt;tr class="&lt;%= cycle("odd", "even") %&gt;"&gt;
               &lt;%= hidden_field_tag("bulk_warehouse_id#{@count}",bulk_warehouse.id) %&gt;
                 &lt;td&gt;&lt;%= text_field_tag("bulk_warehouse_asset#{@count}", bulk_warehouse.asset, :disabled =&gt; true)%&gt;&lt;/td&gt;
                &lt;td&gt;&lt;%= text_field_tag("bulk_warehouse_serial#{@count}", bulk_warehouse.serial, :disabled =&gt; true) %&gt;&lt;/td&gt;
  
  
  
                &lt;td&gt;&lt;%= check_box_tag "enable_record#{@count}",1,false,{:onclick =&gt; "bulk_warehouse_asset#{@count}.disabled = 
                                                                                  bulk_warehouse_serial#{@count}.disabled = 
                                                                                  !this.checked;"}%&gt;&lt;/td&gt;
  
  
  
                      &lt;td class="last"&gt;
                  &lt;%= link_to "#{t("web-app-theme.delete", :default =&gt; "Delete")}", bulk_warehouse_path(bulk_warehouse), :method =&gt; :delete, :confirm =&gt; "#{t("web-app-theme.confirm", :default =&gt; "Are you sure?")}" %&gt;
                &lt;/td&gt;
  
  
              &lt;/tr&gt;
            &lt;/div&gt;          
      &lt;%  @count = @count +1 %&gt;
   &lt;% end -%&gt;
        &lt;/table&gt;
         &lt;div class="actions-bar wat-cf"&gt;
      &lt;div class="actions"&gt;
      &lt;/div&gt;
   ..
  </code></pre>
  
  <p>and this is my controller:</p>
  
  <pre><code> @bulk_objects = BulkWarehouse.all
                           @count= @bulk_objects.count
  </code></pre>
  
  <p>Now I would add in my view a "Select all" checkbox that when you click on it enables all other "enable_record#{@count}" checkbox. I know that this thing should be done using Ajax and Jquery but I don't know how. Anyone can help me?
  Thank you ll</p>