I have a join table:
<% @users.each do |user| %>
<li><%= user.user_id %><%= user.user.name %></li>
gives me
- 1 fred
- 1 fred
- 9 charlie
Well.. thanks so far for the answers. I can see that I was not precise enough to explain what I need.
<% @users.each do |user| %>
<li><%= user.user_id %><%= user.user.name %></li>
is the result on an query. So the result could be 10 different user or some could be double or triple. I want to mark them when they appear multipe. I dont want to find out double entries in my database.....
So I have to find out weather in |user| are mutiple val with the same user_id..to get a true/false Hope this makes it more clear. Right now I dont have clou how to archieve this.