class Libis::Ingester::API::Validator::OrganizationIds
Public Instance Methods
validate_param!(attr_name, params)
click to toggle source
# File lib/libis/ingester/server/api/validator/organization_id.rb, line 18 def validate_param!(attr_name, params) params[attr_name].each do |id| unless Libis::Ingester::Organization.find_by(id: id) fail Grape::Exceptions::Validation, params: [@scope.full_name(attr_name)], message: "'#{id}': organization could not be found." end end end