change attachment callbacks for rails 3 compatibility

Change-Id: I696d920ae0e042593505e4b17ae1d0112dcd6825
Reviewed-on: https://gerrit.instructure.com/28967
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>