Casey Foster
990ab04a45
Fix #2976 Do not add multiple models with same id
2014-02-03 13:19:27 -06:00
Casey Foster
01d9f0f9b1
Close #2847 assume obj as an id first in Collection#get
2013-11-04 10:16:42 -06:00
Tim Griesser
fb8dfda0ed
_addReference, to mirror _removeReference
2013-10-29 19:53:54 -04:00
Jeremy Ashkenas
dba0ec83a3
Merge pull request #2829 from braddunbar/new-methods
...
Add new methods from underscore 1.5.2.
2013-10-25 04:48:29 -07:00
Brad Dunbar
1226e7b0e3
Remove speed test from unit test suite.
2013-10-25 07:31:56 -04:00
Brad Dunbar
2d52d8f795
Add new methods from underscore 1.5.2.
2013-10-25 07:25:43 -04:00
Jaynti Kanani
cc1d114860
refactor to more better fix and add some more tests
2013-10-16 11:04:22 +05:30
Jaynti Kanani
ddc05e36dd
allow operation with dense array for Backbone collection
2013-10-11 18:15:01 +05:30
Jeremy Ashkenas
0a4399e3de
Backbone.js 1.1.0
2013-10-10 21:57:30 -03:00
Jeremy Ashkenas
ac83197b03
Firming up returning models from add and remove, plus tests.
2013-10-10 21:21:59 -03:00
Jeremy Ashkenas
d9ac39fa64
Fixes #2428 -- set now returns added or merged models, so does add, so does push, so does unshift.
2013-10-10 17:14:13 -03:00
Casey Foster
30f84f58a5
Fix the set stack overflow case with the at option too
2013-09-19 15:57:53 -05:00
Casey Foster
98356bd85d
Style tweaks
2013-09-19 15:53:54 -05:00
vlad
b0884cf5e3
fix stack overflow exception fired in Collection.set with large collection (with chrome/nodejs/v8)
2013-09-19 21:37:14 +03:00
Adam Krebs
2bd5df99c5
remove $(document).ready(...) from tests
2013-09-16 10:51:32 -04:00
Tim Griesser
cfe4492863
adding test case for #2612
2013-09-11 20:30:28 -04:00
Tim Griesser
09e0cb3371
model#parse may no longer set the idAttribute
2013-09-11 20:08:37 -04:00
Jeremy Ashkenas
10b0825dbb
Fixes #2623 -- make 'invalid' events pass consisent arguments. Error should go second, after the model in question.
2013-09-11 17:44:35 -03:00
Jeremy Ashkenas
6e5683f606
Fixes #2629 , by removing the no-longer-used sortedIndex
2013-09-11 14:49:23 -03:00
Brad Dunbar
09259964df
QUnit 1.12.0
2013-07-03 11:03:19 -04:00
Brad Dunbar
fa411d6240
Fix #2606 - Collection#create success arguments.
2013-06-11 16:15:07 -04:00
Casey Foster
6f9c1ece1e
Ensure Collection#get does not return a false negative during the change:attr event
2013-06-10 09:32:02 -05:00
Casey Foster
9dbffe31f4
Add "difference" collection method
...
Seeing as "without" is already included and "difference" is just a different API
for without, I see no reason for not adding it. Prior to this commit, one would
have to do `collection.without.apply(collection, other.models)` which is
definitely not as nice as `collection.difference(other.models)`. Useful for
cases like `availableSeats = allSeats.difference(reservedSeats.models)`.
2013-06-09 12:37:24 -05:00
Casey Foster
6ac7704c30
Fix same mutation problem with existing/non-existing mix of models
2013-05-15 15:37:37 -05:00
Casey Foster
61987e8deb
Force add true and remove false flags in add, merge optional
2013-05-08 00:33:34 -05:00
Casey Foster
fd0cb9695d
Fix bug causing mutations while merging with nested models
...
Again, I'm not a huge fan of this solution to the merge + defaults problem, but
this will work until somone more clever than I figures out what to do or we
reevaluate the whole existance checking ordeal.
2013-05-01 13:38:33 -05:00
Casey Foster
f61bd29d30
Add failing merge with defaults test
2013-04-12 10:54:53 -05:00
Casey Foster
d12e4cf881
set respects input order in absence of comparator
2013-04-03 19:18:59 -05:00
Genadi Samokovarov
3bfbcd4123
Don't accept urlRoot from Model and url from Collection
2013-03-25 23:07:46 +02:00
Tim Griesser
8b0973c48e
adding validationError as options property
2013-03-19 10:55:35 -04:00
Jeremy Ashkenas
c779865c18
Merge pull request #2104 from akre54/collection-tests
...
Add reset collection memory and merge tests
2013-03-19 04:54:26 -07:00
Jeremy Ashkenas
a920fed91b
Fixes #2262 -- always use parsed attributes.
2013-03-19 18:45:05 +08:00
Jeremy Ashkenas
ad37b3f9c9
Renaming Collection#update to Collection#set for parallelism ... After a fetch, set is now the default, and reset is the opt-in.
2013-03-19 18:05:26 +08:00
Sam Breed
5f5c501735
fixing broken comparator test in IE8 (missing return statement)
2013-03-15 23:03:50 -06:00
Brad Dunbar
26efd06a21
Tweak url attachment a bit.
2013-03-11 10:03:58 -04:00
Tomas Carnecky
c82cca42af
Copy url from options in the Collection constructor
2013-03-10 15:44:00 +00:00
Casey Foster
2c24e5cd74
Simplify test
2013-02-20 09:10:49 -08:00
Casey Foster
21a875b2c5
Fix #2296 get works with 0 as a model id
2013-02-20 09:08:31 -08:00
Casey Foster
93967561d9
Refactor, account for double-parse bug in update
2013-02-10 10:03:34 -08:00
Casey Foster
ee350e156e
Update parses at model level, simpler get
2013-02-07 18:07:52 -08:00
brad dunbar
e4c046cd4d
Merge pull request #2221 from tgriesser/sync-revert2
...
Making error/success handlers promise compatible
2013-02-05 08:01:34 -08:00
Luke Rodgers
05339d7a13
Bugfix to tests for Backbone.Collection underscore methods.
...
`_.include` was not being called correctly.
2013-02-02 11:11:10 -05:00
Casey Foster
0631d158ed
Fix #2228 - Add findWhere for parity with underscore
2013-01-31 15:45:59 -08:00
Tim Griesser
b1575f72a6
adding tests for error event on all sync methods
2013-01-31 13:34:35 -05:00
Tim Griesser
6e646f1ba7
making error/success handlers promise compatible
2013-01-30 23:41:05 -05:00
Adam Krebs
d33a5a1bbc
add reset collection memory tests
2013-01-16 02:22:30 -05:00
Jeremy Ashkenas
9b3fa12fad
Reverting #2106 -- satisfying lint.
2013-01-16 13:41:38 +11:00
Phil Freo
4961f56c6c
Clarify collection request/sync event behavior
2013-01-14 12:42:30 -08:00
brad dunbar
9e80717877
Merge pull request #2106 from akre54/array-reset-speed-testing
...
Faster Collection _reset
2013-01-12 13:17:52 -08:00
Casey Foster
915700f352
Simplify sortedIndex test
2013-01-11 10:03:11 -08:00