Im trying to for each loop true @participants collection like below:
- ([email protected]).each do |participant|
- @user = User.where(:id => 1).first
# @user = User.where(:id => particpant.id).first ==> throws error: ...
# (undefined method `id' for 1:Fixnum):
#participants
#block
#image
= show_avatar(@user.id)
#name
= @user.username
Confused on how to get the participant.id value for each looped object, cannot figure out how to after searched for a solution. Should I use a render collection instead or is there a way to get the participant.id for each looped participant? thx