adding after_commit_on_create, after_commit_on_update, after_commit_on_destroy to observer in activerecord