Remove deprecation warning in has_many