lib/grape/validations/validators/presence.rb in grape-0.17.0 vs lib/grape/validations/validators/presence.rb in grape-0.18.0
- old
+ new
@@ -1,12 +1,7 @@
module Grape
module Validations
class PresenceValidator < Base
- def validate!(params)
- return unless @scope.should_validate?(params)
- super
- end
-
def validate_param!(attr_name, params)
return if params.respond_to?(:key?) && params.key?(attr_name)
raise Grape::Exceptions::Validation, params: [@scope.full_name(attr_name)], message: message(:presence)
end
end