Commits

Kenneth Jørgensen committed b663327

Added Model serialize function

Comments (0)

Files changed (1)

 		#for own key, val of json
 		#	if val and typeof val.toJSON is "function"
 		#		json[key] = val.toJSON()
-		return json
+		return json
+
+	# Serializes the model for persistent storage.
+	# By default this returns a JSON object, but feel free to extend.
+	serialize: ->
+		return @toJSON()