code-scouts / green_mercury

New members.codescouts.org
Apache License 2.0
2 stars 17 forks source link

Reduce database round-trips in Concept view (Issue #55) #82

Closed steven-ferguson closed 10 years ago

steven-ferguson commented 10 years ago

On the Concept#show view concept_descriptions were being loaded individually causing N + 1 queries. Eager loading is now used to reduce the total number of calls.

Eager load concept descriptions in ConceptsController#show Refactor concept#concept_descriptions to be in descending order Remove concept#history Fix issue with failing concept_features test for markdown *Remove unnecessary before block in `concept_spec.rb

55

ErinCall commented 10 years ago

Looks good! :shipit: