Skip to content
This repository
Newer
Older
100644 121 lines (81 sloc) 6.401 kb
f1050069 »
2010-02-11 Version 0.6.0.
1 # Changelog
2
387f06ca »
2012-03-07 Version 0.11.0.
3 ## 0.11.0 - 7/3/12
4
5 * Emit a "change" or "change:ATTRIBUTE_NAME" event when modifying attributes on an instance.
6 * Remove jQuery dependency (REST persistence still requires jQuery).
7
8 ## 0.10.1 - 7/4/11
30226d73 »
2011-04-07 Version 0.10.1.
9
10 * Add a simple plugin interface. Call with `MyModel.use(MyPlugin, "some", "args")`.
11 * Switch to prototypal inheritance instead of copying functions into a new object.
12 * `Model.each()`, `.map()` and `.select()` now behave more like their ECMA-262 equivalents except they return the class and call their iterators with the `this` value as the model by default.
13 * `Model.add()` now only takes a single argument.
14
387f06ca »
2012-03-07 Version 0.11.0.
15 ## 0.10.0 - 1/3/11
2fb9ae63 »
2011-03-01 Update CHANGELOG.
16
17 * Add `extend()` and `include()` methods to add class and instance methods respectively.
18 * New declaration syntax - pass a function giving you access to the newly created class instead of two separate objects.
19 * A model with an id will be added to the collection when saved (like the docs said originally).
20 * `count()` now follows suit with the rest of js-model and returns the number of models in `all()` allowing you to overwrite `all()` with your own custom implementation - or "Eggs Fish Ham" as he put it ;) [Mark Evans]
21
387f06ca »
2012-03-07 Version 0.11.0.
22 ## 0.9.4 - 6/12/10
a2973160 »
2010-12-06 Version 0.9.4.
23
24 * Add `Model.map()` method.
25 * Protect the collection from accidental modification allowing you to safely `remove()` a model from within an `each` loop.
26 * Added configurable Model.unique_key, exposed as instance.id() and used in finders. Defaults to 'id'. [Ismael Celis and Oliver Nightingale]
27 * Protect an instance's initial attributes from accidental modification.
28
387f06ca »
2012-03-07 Version 0.11.0.
29 ## 0.9.3 - 28/9/10
4c54e467 »
2010-09-28 Version 0.9.3.
30
31 * Add the ability to define a custom `initialize()` instance method that is called at the end of the initialization process. Thanks to Ismael Celis for the idea.
32
387f06ca »
2012-03-07 Version 0.11.0.
33 ## 0.9.2 - 23/9/10
db6528b2 »
2010-09-23 Version 0.9.2.
34
35 * Ajax DELETE sends JSON body, including AjaxSetup data if available. [Ismael Celis]
36 * `Model.remove()` should include removed instance in event data. [Ismael Celis]
37 * Call the `Model.load()` callback with the scope of the class.
38
387f06ca »
2012-03-07 Version 0.11.0.
39 ## 0.9.1 - 21/9/10
33c406a9 »
2010-09-21 Version 0.9.1.
40
41 * If defined, include jQuery.ajaxSetup data in REST parameters. [Ismael Celis]
42
387f06ca »
2012-03-07 Version 0.11.0.
43 ## 0.9.0 - 16/9/10
fc2aed5a »
2010-09-15 Update CHANGELOG and README for v0.9.0.
44
45 * Finder methods now return `undefined` for a missing model.
46 * Remove #update method which you might guess acts like ActiveRecord's #update_attributes which is not the case - no calls are triggered on the persistence adapter.
47 * Model.RestPersistence renamed to Model.REST - Model.RestPersistence can still be used but will be removed in version 1.0.
48 * REST adapter now sends JSON instead of "application/x-www-form-urlencoded" (and so now requires the browser to be JSON-aware).
49 * Add `reverse` class method.
50 * Add Model.VERSION to allow inspection of js-model version.
51 * Add Model.localStorage persistence adapter.
52 * Stop jQuery's JSON parsing throwing an error when encountering Rails' none-empty " " JSON responses.
4a07a44f »
2010-07-16 Remove Underscore dependency. Model.remove method now takes a model i…
53 * Remove Underscore dependency.
54 * `Model.remove` method now takes a model instance rather than an id.
d8932a5b »
2010-07-13 Rename `sort` to `sortBy` and add the ability to specify an attribute…
55 * Rename `sort` to `sortBy` and add the ability to specify an attribute name as well as a custom function. Add `sort` method that acts on a collection just like `Array#sort`.
3d1946d3 »
2010-07-13 Add pluck method that takes an attribute name and returns an array of…
56 * Add `pluck` method that takes an attribute name and returns an array of values.
07f790c3 »
2010-07-10 Fix for callbacks being wrongly called on multiple instances - they w…
57 * Fix for callbacks being wrongly called on multiple instances - they were being stored on the prototype and thus being shared across instances. Thanks to Oliver Nightingale for identifying the bug and writing a test case.
58
387f06ca »
2012-03-07 Version 0.11.0.
59 ## 0.8.4 - 2/7/10
c33ed77e »
2010-07-02 Version 0.8.4.
60
61 * Add named parameters to `Model.RestPersistence` so "/categories/:category_id/posts" will pick up the corresponding `category_id` attribute from your model and be converted to "/categories/2/posts". [Russell Jones]
62
387f06ca »
2012-03-07 Version 0.11.0.
63 ## 0.8.3 - 15/4/10
86772ac0 »
2010-04-15 Version 0.8.3.
64
65 * Fix that `find`, `first`, `last` and `detect` return `null` when nothing is found.
66 * Add `unbind` method to unbind all callbacks for a particular event or a specific callback by passing a reference to the original function.
67 * Move callback functionality into a separate module and mix-in to class and instance.
68
387f06ca »
2012-03-07 Version 0.11.0.
69 ## 0.8.2 - 7/4/10
fe28c8e6 »
2010-04-07 Version 0.8.2.
70
1d9d72ac »
2010-04-01 Don't log an error when Rails returns a response of " " for a `head :…
71 * Don't log an error when Rails returns a response of " " for a `head :ok` response.
fe28c8e6 »
2010-04-07 Version 0.8.2.
72 * `jQuery.ajax` should use `dataType` "json" removing the need to set a global `beforeSend`. [Jason Lee]
1d9d72ac »
2010-04-01 Don't log an error when Rails returns a response of " " for a `head :…
73
387f06ca »
2012-03-07 Version 0.11.0.
74 ## 0.8.1 - 29/3/10
c7ec1815 »
2010-03-29 Version 0.8.1.
75
1d9d72ac »
2010-04-01 Don't log an error when Rails returns a response of " " for a `head :…
76 * Fix that custom class methods should be available after chaining.
578d0c13 »
2010-03-24 Custom class methods should be available after chaining.
77
387f06ca »
2012-03-07 Version 0.11.0.
78 ## 0.8.0 - 21/3/10
9123e4f9 »
2010-03-21 Version 0.8.0.
79
80 * Move model collection methods into a separate object allowing you to customise the defaults in a single place.
81 * Move model instance methods into a separate object. This allows you to redefine the defaults once rather than having to pass the same custom method to multiple models at declaration time.
82 * Defining a model now takes three arguments: name, class methods, instance methods.
83
387f06ca »
2012-03-07 Version 0.11.0.
84 ## 0.7.3 - 10/3/10
9123e4f9 »
2010-03-21 Version 0.8.0.
85
86 * Fix callbacks in IE.
87 * Fix broken Ajax tests in IE6 and IE7.
88
387f06ca »
2012-03-07 Version 0.11.0.
89 ## 0.7.1 - 5/3/10
11608510 »
2010-03-05 Version 0.7.1.
90
91 * `Model.RestPersistence` now recognises a 422 response as validation failure and populates the model's errors object with the response data.
92 * `Model.errors` is now an object and has a similar interface to ActiveModel.
93 * Fix that `changes` should only be merged after a successful `save` (create/update).
94 * Calling Model#attr() with no arguments returns a combined object of attributes/changes.
95 * Fix that `Model.RestPersistence` Ajax failures should correctly run the supplied callback.
96 * Add `count` method to `Model.Collection`.
97 * Collection methods now access the collection through the `all` method so that `select`, `each`, etc work as expected if it's overwritten.
98
387f06ca »
2012-03-07 Version 0.11.0.
99 ## 0.7.0 - 18/2/10
ceddb12d »
2010-02-18 Version 0.7.0.
100
101 * Events are now bound directly to a model rather than using jQuery `bind`. Collections also now have the concept of events with "add" and "remove" built-in.
102
387f06ca »
2012-03-07 Version 0.11.0.
103 ## 0.6.1 - 12/2/10
ceddb12d »
2010-02-18 Version 0.7.0.
104
63f4a3a4 »
2010-02-12 `update` should trigger "update" event, add separate `merge` method.
105 * `update` should trigger "update" event, add separate `merge` method.
69667789 »
2010-02-12 Fix that persistence failure should not trigger corresponding event.
106 * Fix that persistence failure should not trigger corresponding event.
107
387f06ca »
2012-03-07 Version 0.11.0.
108 ## 0.6.0 - 11/2/10
f1050069 »
2010-02-11 Version 0.6.0.
109
110 * Pass only a single callback to save/destroy which is called with a boolean to indicate success/failure.
111 * Bundle release into a single, versioned Javascript file plus minified version.
112 * Change behaviour of `Model.Collection` and don't let duplicates (scoped by id) of the same model to be stored. [Laurie Young]
113
387f06ca »
2012-03-07 Version 0.11.0.
114 ## 0.5.1 - 3/2/10
f1050069 »
2010-02-11 Version 0.6.0.
115
116 * Fix that setting a null value with `attr` should be read back correctly from `changes`.
117 * `errors` array shouldn't have to be manually `reset` when implementing `validate`.
118
387f06ca »
2012-03-07 Version 0.11.0.
119 ## 0.5.0 - 3/2/10
f1050069 »
2010-02-11 Version 0.6.0.
120
121 * First tagged release.
Something went wrong with that request. Please try again.