OpenFarm icon indicating copy to clipboard operation
OpenFarm copied to clipboard

Storing soil preferences on a crop

Open simonv3 opened this issue 8 years ago • 1 comments

As requested by @anant-dev it'd be great if the soil preference of a crop was available to edit and create.

I think it makes sense to store this on a crop because there's certainly some things that we know about eg. tomatoes and the type of soil they like to grow in. Then you can use a guide to overwrite this information (which would make populating this information easy for people who want to make a guide but don't know what kind of soil it's for).

How do we store this information though?

My initial reaction is to create some fields, but it might be more interesting to finally pursue the data element object @RickCarlino talks about [here]https://github.com/openfarmcc/OpenFarm/issues/66#issuecomment-48126967). That might require some changes to the API, but it'll be much more robust in the future (rather than just adding stuff to the crops object) and it can be used for other models.

But I wonder if that's overkill. Maybe that's to large of a refactor?

@roryaronson what are your thoughts here?

This is linked to https://github.com/openfarmcc/OpenFarm/issues/558

simonv3 avatar Feb 17 '17 17:02 simonv3

@simonv3 Looks like it is possible with Mongoid although it was just an idea when I proposed it, so it might need some exploration.

RickCarlino avatar Feb 20 '17 22:02 RickCarlino