Added condition for actionpack version.