mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-02 21:51:01 -05:00
2a260abf05ba0cff3ef75fa3c76af72190b5d613
Postgres complains if the ORDER BY clause of a SELECT DISTINCT query is not precisely one of the SELECTed fields. The default sort order on crops is lower(name), and Postgres is not smart enough to notice that it can calculate this from fields which are selected. The solution is to override PlantParts#crops to remove the ORDER BY clause, and replace it with `ORDER BY name`. This is not perfect, because it means the crops associated to plant parts will not be sorted in the same order as crops on the rest of the site.
Growstuff
Welcome to the Growstuff project.
Growstuff is an open source/open data project to create a website for food gardeners.
You can find most of our documentation at: http://wiki.growstuff.org/
Our development uses Extreme Programming practices, which means we pair on all our work. Feel free to fork our code and explore, but if you would like to contribute back to us, please read http://wiki.growstuff.org/index.php/Development_process_overview before sending us a pull request.
Description
Languages
Ruby
76.3%
Haml
19.5%
SCSS
1.3%
HTML
1%
JavaScript
0.9%
Other
1%

