TreeView Control

I am just learning RubyRails.....

I am simply trying to add a tree view control. I want to use the YUI
treeview control.

Here is my code

<% for tax in @taxonomies%>
     <%=tax.parent-%> <%=tax.description-%> <br>
              <script type="text/javascript">
        addNode(node_id,description)
    </script>
<% end %>

I have a javascript that will add a node. My question is...how do I
pass the data I get from the ruby database loop
to the javascript?