Adjust syntax of less than 3.3 rails