YaleSTC/reservations — pull request #680 by squidgetx (2014-07-10 22:41:11+00:00)
Title: reduces number of db queries in cart validations

Queries don't work the way I thought they work, unfortunately.

This PR reduces the query count of cart#validate_items to O(1) and reduces the query count of cart#validate_dates_and_items by about half (though this is still O(n) queries, mostly due to a faulty num_available method).