set cancan abilities for harvests

This commit is contained in:
Skud committed 2013-09-17 15:53:51 +10:00
1 parent 2196bc8373
commit 67b88e8e18
2 files changed
+7

No files matched your search

+3
View File
@@ -1,4 +1,7 @@
class HarvestsController < ApplicationController
load_and_authorize_resource
# GET /harvests
# GET /harvests.json
def index
+4
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