Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Upgrading To CanJS 2

$
0
0
Thanks for the link. Looks like my upgrade was successful. Wasn't painful at all. Only issue I had was related to the removal of the elements plugin which is still referenced in model/list/list.js which my app is using.

Question though.

A while back I upgraded to the latest and ran into an issue (I don't remember what the issue was), but daffl-mania said that I needed to tell my model list definition which Observe type to create when when items are added to the list.
  1. Pool.List = Pool.List.extend({
        Observe: Pool
    },{

        selected: function() {
            var pools = new Pool.List();

            this.each(function(p) {
                if(p.attr('selected')) {
                    pools.push(p);
                }
            });
            return pools;
        }
    });
I have changed "Observe" to "Map", but is it even required to be there at all?

Viewing all articles
Browse latest Browse all 3491

Trending Articles