Sha256: cb76c9947f978d686981b7406f23abaadb6393b40d1c2c51a85d5064838977fb
Contents?: true
Size: 317 Bytes
Versions: 6
Compression:
Stored size: 317 Bytes
Contents
module Grape module Validations class PresenceValidator < Validator def validate_param!(attr_name, params) unless params.has_key?(attr_name) raise ValidationError, :status => 400, :param => attr_name, :message => "missing parameter: #{attr_name}" end end end end end
Version data entries
6 entries across 6 versions & 2 rubygems