All are fine except for plantings. I'm pretty sure hte problem is to do
with these two lines in app/model/ability.rb
can :update, Planting, :garden => { :owner_id => member.id }
can :destroy, Planting, :garden => { :owner_id => member.id }
I'm pretty sure that's the right syntax (according to
https://github.com/ryanb/cancan/wiki/Defining-Abilities) but since it's
the update and delete actions that are failing, I guess I must have it
wrong somehow. Any hints?
There's still probably stuff broken, but this seemed like a good spot to
commit. Sorry for the enormous chunk of code. I was attempting to
update the views, but found that I needed to update a few things
elsewhere as well to make them work.