                     details: data.details
                 , (err) ->
                     event.beforeUpdate = oldValue
-                    callback err, event
+                    callback err, event, changes
             else
-                callback null, event
+                callback null, event, changes
         else
-            Event.create data, callback
+            changes.creation = true
+            Event.create data, (err, event) ->
+                callback err, event, changes
 
-Event.getInRange = (options, callback) ->
-    Event.request 'byDate', options, callback

americano = require 'cozydb'
log = require('printit')
    prefix: 'event:model'


            or data.details isnt event.details
                # clone object
                oldValue = event.toJSON() # clone the object properties
                changes.update = true
                event.updateAttributes
                    start: data.start
                    end: data.end
