define a foreign key relationship where the key field may contain NULL?
Just create a belongs_to relationship, as above. If the column is NULL then the inflation to the foreign object will not happen. This has a side effect of not always fetching all the relevant data, if you use a nullable foreign-key relationship in a JOIN, then you probably want to set the join_type to left.