Methods

Class/Module Index [+]

Quicksearch

Grape::Validations::AtLeastOneOfValidator

Attributes

params[R]

Public Instance Methods

validate!(params) click to toggle source
# File lib/grape/validations/at_least_one_of.rb, line 6
def validate!(params)
  @params = params
  if no_exclusive_params_are_present
    raise Grape::Exceptions::Validation, params: attrs.map(&:to_s), message_key: :at_least_one
  end
  params
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.