This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fortune = require('fortune') | |
const fortuneHTTP = require('fortune-http') | |
const { errors: { BadRequestError } } = fortune | |
function input(context, record) { | |
switch (context.request.method) { | |
case 'create': | |
return record | |
case 'update': | |
throw new BadRequestError('Invalid status') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Ability } from 'ember-can'; | |
import computed from 'ember-computed'; | |
export default Ability.extend({ | |
canShow: computed('model.show', function() { | |
return this.get('model.show'); | |
}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Ability } from 'ember-can'; | |
import computed from 'ember-computed'; | |
export default Ability.extend({ | |
canShow: computed('model.show', function() { | |
return this.get('model.show'); | |
}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* DOMParser HTML extension | |
* 2012-09-04 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ | |
/*! @source https://gist.github.com/1129031 */ |