support for different versions of rails