has_many :through distant relationships

I have the following associations:


my models look like:

class Disk < ActiveRecord::Base has_many :disk_user_files has_many :user_files, through => :disk_user_files end

class DiskUserFile < ActiveRecord::Base   belongs_to :disk   belongs_to :user_file end

class UserFile < ActiveRecord::Base   has_many :disk_user_files   has_many :disks, :through => :disk_user_files end

So far so good. I want to extend this to something like


so I add :belongs_to :user to my UserFile class and add:

class User < ActiveRecord::Base   :has_many :user_files end

The problem I'm having is associating users all the way back through user_files and disk_user_files to disks Any help would be appreciated.