Compatibility with rails 4.1