Validate your API parameters in Rails