fix nested cursors for rails 3

Change-Id: Ib87b2ff81d58d1e066ffb134d1ecb9d4849c1600
Reviewed-on: https://gerrit.instructure.com/33417
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>