Created
January 18, 2012 10:32
-
-
Save ciaranarcher/1632360 to your computer and use it in GitHub Desktop.
Example Request Validation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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