lib/rpush/client/active_model/adm/data_validator.rb in rpush-5.2.0 vs lib/rpush/client/active_model/adm/data_validator.rb in rpush-5.3.0

- old
+ new

@@ -3,10 +3,10 @@ module ActiveModel module Adm class DataValidator < ::ActiveModel::Validator def validate(record) return unless record.collapse_key.nil? && record.data.nil? - record.errors[:data] << 'must be set unless collapse_key is specified' + record.errors.add :data, 'must be set unless collapse_key is specified' end end end end end