set cancan abilities for harvests

This commit is contained in:
Skud
2013-09-17 15:53:51 +10:00
parent 2196bc8373
commit 67b88e8e18
2 changed files with 7 additions and 0 deletions

View File

@@ -1,4 +1,7 @@
class HarvestsController < ApplicationController
load_and_authorize_resource
# GET /harvests
# GET /harvests.json
def index

View File

@@ -64,6 +64,10 @@ class Ability
can :update, Planting, :garden => { :owner_id => member.id }
can :destroy, Planting, :garden => { :owner_id => member.id }
can :create, Harvest
can :update, Harvest, :owner_id => member.id
can :destroy, Harvest, :owner_id => member.id
can :create, Photo
can :update, Photo, :owner_id => member.id
can :destroy, Photo, :owner_id => member.id