A Song :has and belongs to many Playlists.
I want to store additional information about a song in a given
playlist, i.e. the number of request of this song in a playlist.
In SQL I would add an extra column :number_of_requests to the
songs_playlists table.
But how do I do it with pure ActiveRecord?
You can make the join table be a fully fledged ActiveRecord model (it
will need an id column) and add the new columns to it. Then use
has_many :through rather then habtm
Have a look at the rails guides at http://guides.rubyonrails.org/
particularly the one on ActiveRecord Associations (assuming you have
already looked at the Getting Started one). Google will provide lots
of help too.