Fix ActiveRecord all deprecation by replacing it with to_a