made this rails 4 compatible