These are chat archives for canjs/canjs

29th
Aug 2017
kostya.aderiho
@kaderiho
Aug 29 2017 10:44

Hi all, can someone answer please where is a best place to keep custom methods? For example I have some connection:

Attachment.connection = connect(
    [behaviors], {
        Map: Attachment,
        List: Attachment.List,
        name: 'attachment',
        url: BASE_URL,
        ..........
    });

I have also method like getValidFormats (it is not a CRUD method), can I put into connection as well? Thanks.

Nico R.
@nriesco
Aug 29 2017 21:53
what is the second parameter of route.data.set? https://canjs.com/doc/can-route.html#data
route.data.set({type: 'page', id: 5}, true); I mean the true parameter here
Nico R.
@nriesco
Aug 29 2017 21:59
I’m assuming true => works like UPDATE and false => works like PATCH?
Kevin Phillips
@phillipskevin
Aug 29 2017 22:04
it's whether or not to remove other properties
Nico R.
@nriesco
Aug 29 2017 22:05
ok, so it confirms my theory, thanks!