Skip to content

Instantly share code, notes, and snippets.

@ciaranarcher
Created January 18, 2012 10:32
Show Gist options
  • Save ciaranarcher/1632360 to your computer and use it in GitHub Desktop.
Save ciaranarcher/1632360 to your computer and use it in GitHub Desktop.
Example Request Validation
req = Request.new(params)
req.validate_params_as do |conditions|
conditions[:scriptingtimingid] = :numeric
conditions[:script_name] = :string
conditions[:completed_on] = :time
end
req.validate?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment