need help with join / edit

Hi i have a issue here:
Model: USER
JOIN-MODEL: user_company

in the index view of the user i would like to have a second row per each
user to insert a index / vire partial from the User-Company-Join

<h1>Listing Users</h1>

<table border=1>

<% for u in @users %>
    <td><%=h u.firstname + %></td>
    <td><%=h u.lastname %></td>
    <td><%=h u.username %></td>
    <td><%= link_to 'Show', u %></td>
    <td colspan=4><%=h render :partial =>'user_companies/edit', :local
=> @users %></td>
<% end %>


<br />

Just at a glance it looks like you should change @user_comp to
@user_company in user_companies/edit.

And as a tip if you don't have any additional fields to keep track of
in your user_company model, you should use a has_and_belongs_to_many


hi, mh ur right, but still it complains about the variable im using in
the partial...

<% form_for(@users.companies) do |f| %>

undefined method `companies' for #<Array:0xb6c106a4>

what i wanna achivee is the join table between user and company. the rb's are ok.

thx tom