Skip to content

Instantly share code, notes, and snippets.

@shreyanshdwivedi
Last active June 18, 2019 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shreyanshdwivedi/ae72053a0867ee8da38a91a90dd7538f to your computer and use it in GitHub Desktop.
Save shreyanshdwivedi/ae72053a0867ee8da38a91a90dd7538f to your computer and use it in GitHub Desktop.
Open Event: Tests if a user is deletable or not
// app/components/account/danger-zone.js
isUserDeletable: computed('data.events', 'data.orders', function() {
if (this.get('data.events').length || this.get('data.orders').length) {
return false;
}
return true;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment