move table names to variables in has_one_through