Commit Graph

10 Commits

Author SHA1 Message Date
gnattery
349aecbb69 Delete gardens 2013-03-20 12:30:38 +11:00
Skud
21960a5494 Tried to get controller tests passing.
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?
2013-02-01 13:25:06 +11:00
Skud
8da9a13eae Changed garden.member_id to garden.owner_id 2013-01-13 21:29:28 +11:00
Skud
edb59e07ee s/users/members/g -- all tests pass
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.
2013-01-13 18:33:43 +11:00
Skud
fdb309cdd2 s/users/members/g -- controllers and their tests 2013-01-13 17:53:24 +11:00
Miles Gould
bf58ff22a6 Give each user a default garden, called "Garden"
- created by an after_create callback on the user object
 - added test on model object
 - changed test of GET /gardens to expect Garden.all
2012-12-11 15:50:28 +00:00
Skud
760cf03b2c Fixed tests by getting rid of valid_session 2012-11-26 19:04:43 +11:00
Norman Ancajas
b39ee792b4 give each user a garden. note: tests broken! 2012-11-05 14:29:04 +08:00
Norman Ancajas
77c2e83c64 wrote migration to add test users, fixed tests 2012-11-05 13:03:19 +08:00
Norman Ancajas
f89815b6b3 added gardens table 2012-11-05 11:45:56 +08:00