You’re not receiving notifications from this thread.
Active Record Associations
- I'd like to access all
fpclassesthat partner belongs to? ( Is there any other way to access except to provide another foreign key named
partner_idon fpclass ) Any ideas really helpful.
You should be able to do this:
has_many :classes, through: :centers
Which Rails will know how to query based upon the other associations in the Center class. It basically compiles those associations together into the proper joins for you when you use the
through option. You might have to tweak this a little bit for any class names or whatever that don't match up directly, but that should do the trick for you.