Adds compatibility with more Rails versions