class UsersCreate < Goliath::API
use Goliath::Rack::Params
use Goliath::Rack::Validation::RequiredParam, {:key => 'token',
:message => 'is required'}
use Goliath::Rack::Formatters::JSON
end
In the example above, if no "token" param is passed, Goliath returns "[:error, \"token is required\"]", instead of a Json response. I'm guessing RequiredParam stops the chain if there's no "token", so JSON formatter is never hit.
How do I go about making it return a Json response? Create my own RequiredParam or monkey patch it?
Regards.