fgrehm/letter_opener_web — pull request #28 by kimrgrey (2014-06-14 09:44:11+00:00)
Title: Added validation of params for letters_controller.

When some gem like [rack-mini-profiler](https://github.com/MiniProfiler/rack-mini-profiler) sends additional queries on URL `/letters/mini-profiler-resources/includes.js` to measure speed of page loading then `LettersController` receives `{"id"=>"mini-profiler-resources", "style"=>"includes"}` and crashes with Internal Server Error. It is sad =(

So, as for me, controller should check that:

1. Received `:id` is valid and letter with this `:id` exists
2. Received `:style` is valid and acceptable

Queries with invalid parameters should be ignored with `render :nothing => true`.