Initializing dynamically generated Multiple check boxes (AJAX)

I am able to read the values of dynamically generated check boxes when
the user selects or deselects the checkbox. But it is not clear from
Rails documentation on how to populate the check boxes when it is
displayed for the first time.

I have the following in my index.rhtml

<% form_remote_tag :update => "feedback_message",
           :url => { :action => :update },
           :html => { :id => "my_dom_id"} do %>

<div id="my_form_check_boxes">
  <% form_ids = [] %>
  <% @foo.each_with_index do |s, i| %>
    <div class="my_check_box" id="<%= s.dom_id %>">
      <%= check_box "#{s.dom_id}#{foo_ids[i]}", "my_attribute",
           :onclick => remote_function(:update => "feedback_message",
                          :url => { :action => "update", :id => s.id},
                        :complete => "Element.show('feedback_message')",
                          :submit => "my_dom_id" ) %>
        <label> <%= s.name %> </label>
    </div>
  <% end %>
</div>

TIA.