Sha256: 2fbfbf29f3d8c3b4e008db2392d96fd9796e006118b5639e3fb9f01180cef608

Contents?: true

Size: 363 Bytes

Versions: 49

Compression:

Stored size: 363 Bytes

Contents

module Rpush
  module Client
    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'
          end
        end
      end
    end
  end
end

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
rpush-5.2.0 lib/rpush/client/active_model/adm/data_validator.rb
rpush-5.1.0 lib/rpush/client/active_model/adm/data_validator.rb
rpush-5.0.0 lib/rpush/client/active_model/adm/data_validator.rb
rpush-4.2.0 lib/rpush/client/active_model/adm/data_validator.rb
rpush-4.1.1 lib/rpush/client/active_model/adm/data_validator.rb
rpush-4.1.0 lib/rpush/client/active_model/adm/data_validator.rb
rpush-4.0.1 lib/rpush/client/active_model/adm/data_validator.rb
rpush-4.0.0 lib/rpush/client/active_model/adm/data_validator.rb
rpush-3.3.1 lib/rpush/client/active_model/adm/data_validator.rb
rpush-3.3.0 lib/rpush/client/active_model/adm/data_validator.rb
rpush_extended-3.2.6 lib/rpush/client/active_model/adm/data_validator.rb
rpush_extended-3.2.5 lib/rpush/client/active_model/adm/data_validator.rb
rpush-3.2.4 lib/rpush/client/active_model/adm/data_validator.rb
rpush-3.2.3 lib/rpush/client/active_model/adm/data_validator.rb
rpush-3.2.2 lib/rpush/client/active_model/adm/data_validator.rb
rpush-3.2.1 lib/rpush/client/active_model/adm/data_validator.rb
rpush-3.2.0 lib/rpush/client/active_model/adm/data_validator.rb
rpush-3.1.1 lib/rpush/client/active_model/adm/data_validator.rb
rpush-3.1.0 lib/rpush/client/active_model/adm/data_validator.rb
rpush-3.0.2 lib/rpush/client/active_model/adm/data_validator.rb