runemadsen/cancan-backbone — pull request #7 by fluxsaas (2014-06-09 17:51:22+00:00)
Title: pass options to the Ability/Rule class

you can pass an option to lookup the specific backboneClass. this comes
in handy if you do not have the default `backboneClass` defined on your
backbone model.

you can pass in a function or attribute name:

a = new Ability({}, {rule: {backboneClass: 'foo'}})

or:

a = new Ability({}, {rule: {backboneClass: dunction(entity){return entity.modelName}}})