Skip to content
This repository has been archived by the owner on May 22, 2018. It is now read-only.

Commit

Permalink
Added changes to date for Jester 1.3.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.thoughtbot.com/jester/trunk@84 d7758119-aa2c-0410-afcd-b700fbd0d0b3
  • Loading branch information
emill committed May 25, 2007
1 parent 5dbe3bc commit 8f4cd72
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG
@@ -1,3 +1,20 @@
Version 1.3

* JSON support. Specify that all requests will be posting to .json URLs, and parsing JSON responses, by setting the "language" option inside Base.model(). This option defaults to "xml".

Base.model("User", {language: "json"})

Using JSON, most attributes will not be cast into their type. The "id" column will be cast to an integer, and if a field is named "created_on", "created_at", "updated_at", or "updated_on", it will be parsed into a Date object.

* Now passes through Prototype's optional "json" argument to Ajax callbacks. If an X-JSON header came back with the response from an Ajax request, Prototype will return this json alongside the transport object.

User.save(function(user, json) {yourHandler(json);})

* Added helper methods updateAttributes(), and setAttributes(). Both set the attributes of the object to the passed hash, however updateAttributes() will call save the object when done. For this reason, updateAttributes() accepts a 2nd optional callback argument (either a function or a Prototype Ajax.Request options hash).

* Now safe to use Prototype-style hashes (using $H) when calling build, create, setAttributes, or updateAttributes.


========================
Version 1.2 (April 30th)
========================
Expand Down

0 comments on commit 8f4cd72

Please sign in to comment.