exception added for rails version < 3