Skip to content

Instantly share code, notes, and snippets.

View ember-crud-pattern.js
App.PostsController = Em.ArrayController.extend({
actions: {
create: function () {
// some validation logic here
return this.send('createPost');
},
save: function (model) {
// some validation logic here
View nvm_install.sh
#!/usr/bin/env bash
NVM_DIR="$HOME/.nvm"
if ! hash git 2>/dev/null; then
echo >&2 "!!! You need to install git"
exit 1
fi
if [ -d "$NVM_DIR" ]; then