Rails Engine to handle badly encoded requests