fix find_attachment_possibly_replaced for rails 3

Change-Id: I89a14642008d48b9cee1fb10865c2206af37b4ec
Reviewed-on: https://gerrit.instructure.com/29204
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>