Having trouble editing self-reference join model attribute

I’m a newbie in rails and working on my first project with it. I have a
database that uses a self reference through a join model to add
favorite players. In the join model I have an additional attribute for
players to make notes of each favorite player.

My problem is I’m having difficulty editing the note attribute. All the
favorite players are displayed all at once along with their notes. I do
this by using fields_for, but I can only capture the first note of the
page when I post.

< fields_for “favorite_user”, @favs[index] do |favorite_note| %>
<= favorite_note.text_area :note, “rows” => 5 %>
< end %>

def favorites
if request.get?
@players = Player.find(params[:id]).favorites
@favs = FavoriteUser.find_all_by_player_id(params[:id])
elsif request.post?
self_player = Player.find(params[:id])
p @params ##check to see if I got all the notes?


class Player < ActiveRecord::Base
has_many :favorite_users
has_many :favorites, :through => :favorite_users

class FavoriteUser < ActiveRecord::Base
belongs_to :player
belongs_to :favorite, :foreign_key => “favorite_id”, :class_name =>

database tables

CREATE TABLE players (
id int(11) NOT NULL auto_increment,
username varchar(50) NOT NULL,

CREATE TABLE favorite_users (
player_id int(11) default NULL,
favorite_id int(11) default NULL,
note varchar(100) default NULL