grape-entity
grape-entity copied to clipboard
multiple error messages when used as params
class Entity < Grape::Entity
expose :car, documentation: { type: String, values: ["foo", "bar"] }
end
And then use it as validation with
params do
requires :all, using: Entity.documentation
end
"car is missing, car does not have a valid value"
Anyway, for it to just have the second one of the error messages? If I don't make it required then it does not show up at all.