Fix incorrect Rails version in deprecation notice

extracts minimum rails version out to a method and use that in the deprecation warning message