Fix support Rails version: 3.1 onwards