support rails 3 & 4