G5/g5-pricing-and-availability-service — pull request #48 by johnlucia (2014-07-15 18:43:21+00:00)
Title: only return units for a location when @location exists

@mmitchellg5 or @bbauer or @crissmancd, you mind reviewing this?

There's a bug in the locations/floor_plans route where all floorplans for a given client show up, when you only expect to get floorplans that belong to that location. For an example, check this out:

http://g5-cpas-6d4u4sc-madrona.herokuapp.com/locations/g5-cl-1shcl0fm-honeyman-hardware-lofts/floor_plans

You would only expect to see the two units that belong to the honeyman hardware location, yet you see all of Madrona's units for all locations. This is making a mess of the floorplans cards widget, because its getting then displaying all that extra data when it grabs this json:

http://g5-cpas-6d4u4sc-madrona.herokuapp.com/locations/g5-cl-1shcl0fm-honeyman-hardware-lofts/floor_plans.json