Make dejavu compatible with Rails 4