Skip to content

Instantly share code, notes, and snippets.

View ssorallen's full-sized avatar

Ross Allen ssorallen

  • USA
View GitHub Profile
var fs = require('fs');
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
env: {
build: {
NODE_ENV: 'production'
}
class Ability
include CanCan::Ability
def initialize user, options = {}
can :read, :all if !user
can :manage, :all if user.has_role?(:admin)
can :manage, Measurement do |m|
m.user == user
end
can :create, Measurement