fix has_many_attr for more newest rails