我想实现如下所示。如何获得new_attributes
哈希?
after_save :update_asterisk_contact
def update_asterisk_contact
changes # => [{ "sip_id"=>[334, 355], "updated_at"=>[Tue, 29 Oct 2013 16:03:17 CET +01:00, Tue, 29 Oct 2013 16:08:31 CET +01:00]}]
# new_attributes => {'sip_id'=> 355}
client = Asterisk::Client.instance
client.update(self.id, new_attributes)
end