Update to support rails 4