I'm having some trouble with nested loops. Does anyone know a better way of doing this:
@product.tracks.each do |t|
t.artists_tracks.each do |at|
at.role = at.artist.role
at.position = at.artist.position
at.save
end
end
I'm getting an undefined method role = error
Thanks in advance