Has_many :through distant associations

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

class DiskUserFile < ActiveRecord::Base
belongs_to :disk
belongs_to :user_files

class UserFile < ActiveRecord::Base
has_many disk_user_files

Where is your problem :smiley:

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