Params Validation
Introduction
You will probably want to access data sent in by the user or other parameters in your controller actions. There are two types of parameters possible in a web application:
The first type are parameters that are sent as part of the URL, called query string parameters. The query string is everything after "?" in the URL.
The second type of parameter is usually referred to as POST data. This information usually comes from an HTML form which has been filled in by the user, and is called POST data because it can only be sent as part of an HTTP POST request.
Example Usage
Maze does not make any distinction between query string parameters and POST parameters, and both are available in the params
hash in your controller:
With Maze parameter validation, it's easy to keep your code organized:
Last updated