Fixing compatible with Rails >=3.2.9