rails 4 compatibility

Here are the changes I had to make to use Dossier with Rails 4.0.0.beta1.