Update to support Rails version >= 4