Fix TODO syntax
Use ActiveRecord::Dirty to get changes on query
Extract 'update' handling