Upgrade to 2.6 Active record pattern