update to support rails 4