fix searching in nested scaffolds, uniq on rails4 always run query, distint_value = true must be used