flatiron/plates — Issue #44: Issues Mapping with class attributes...
Author: Mantic
Created: 2012-03-02 07:57:15+00:00
State: open

I'm trying to insert a new class into the class attribute of a tag, but the Mapping behavior doesn't quite run as expected:

I'm using:
`map.class('home').insert('selected');`

(with data: `{selected:"selected"}`)

and this happens: `

` becomes `

`

As soon as any other class is mixed in, it fails:
`

` is skipped

Ideally, I'd expect an "insert" action to actually insert data, instead of replacing it:
`

` would become `

`

Any suggestions?

On a side note, this works the same as above:
`map.where('class').is('home').insert('selected');`

Perhaps a 'has' conditional would be appropriate?
`map.where('class').has('home').insert('selected');`