Make annotator Rails4 compatible