better support for newer versions of rails.