Builds ActiveRecord joins from association paths