I have the following setup in rails
class Book < AR
has_one :assignment
class Assignment < AR
belongs_to :book
My problem is that the assignment is an excluded model in a multi-tenant rails app while book is not. With apartment it is easy to do a has_one/belongs_to where the excluded model contains the has_one statement, but for various reasons I would like to store the foreign key in the Assignment model. Is there an easy way to do this?
Edit: the use case is a model that tracks reviews of the data in each book, which must be in one place for export to another application. The exported model must contain the id and tenant of the book being reviewed. Visiting each of hundreds of schemas on a cron job in order to collect the info is not a viable option. I am using postgres with a separate schema for each apartment.