Initializing dynamically generated Multiple check boxes (AJA

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 %>

<% form_ids = [] %> <% @foo.each_with_index do |s, i| %>
<%= 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" ) %> <%= s.name %>
<% end %>

TIA.