Scope the has_one conditions to the table name