Habtm and also has_many of the same things

Hi,
our app is a situation where users can upload files and also mark files
uploaded by other users as their favorites. So for the favorites we are
using a simple many-to-many with a tie table.

So in attempting that it looks like

class User < ActiveRecord::Base
has_and_belongs_to_many :media_file
has_many :media_file
end

class MediaFile < ActiveRecord::Base
has_and_belongs_to_many :user
belongs_to :user
end

but that won’t work because obv. if you call

current_user.media_file.find(:all)

there is no way to specify which association you are looking for. Or is
there?

if not what would be the most Rails-ish way of setting this up?

thanks
Sam

has_and_belongs_to_many :favorite_media_files, :class => “MediaFile”
has_many :media_files