Add tracking of dirty attributes
Add AR 3.2 fallbacks to handle dirty attributes tracking