Save only working on New objects

I’m using a habtm self referential (below). When I work with it in the
console, if I do this:

memberA.friends[0] = memberB

Nothing actually gets saved to the join table. (memberA and memberB are
previously saved objects).

If, however, I do this:

memberA.friends[0] = // the new object here is the

the relationship Does get saved to the join table.

Anyone have a clue as to why this is? And how I can get changes to
previously saved objects to save to the sql join table?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs