Rails resources
This page contains some helpful bits of code created by Code Sprinters. Feel free to use these as Free Software under MIT licence.
OutputStreams and FlashMessages
The OutputStreams plugin allows for safe handling of data that arrives in mixed form (html and plain text). Each part of the stream is marked by form type and outputs to the proper format. Currently it captures plain text for embedding in html code, but this can be easily extended.
FlashMessages is an application of OutputStreams that has been designed especially for flash messages. Easily embed HTML in flash messages without risk to XSS vulnerability, even if some user-supplied data is not captured. Also, multiple messages can share a single level of severity.
Expose
This plugin changes the default policy for HTTP access to all public methods of controllers. Each method must be explicitly exposed (hence the name) to a specific set of HTTP verbs.
This prevents some common errors such as making public a filter method or neglecting to add the proper verify rule to prevent GET actions when only POST should be allowed.
