Adds support for latest versions of rails 3