active record model changes handling