allenpaltrow/garden — pull request #1 by pfletch1023 (2012-06-22 14:10:20+00:00)
Title: @allenpaltrow Plants are now the unit of choice.

This is what I got:

Plants are now the basic model. A plant belongs_to a bucket and has_many seeds. However, buckets and seeds have :class_name "Plant." So really a plant belongs to a plant and has many plants at the same time.

To try it out, clone my fork into another folder on your local machine and run "rake db:migrate." Open up your rails console and create two plants. Adding one of the plants to the other's "seeds" will make the one plant's bucket equal to the other plant and include the plant in the bucket plants seeds.

There are also users and vines. Users have many plants, so that association is pretty easy. The same is true for vines. A vine is just another container that connects all iterations of a plant.

I haven't touched the test suite....