make backwards compatible with rails 3.1.5