91167736a7
fixes CNVS-11041 this commit fixes PolymorphicTypeOverride. PolymorphicTypeOverride was added as a shim to assist in namespacing models that are referenced in polymorphic relationships. It did this by overriding read_attribute on the particular attribute (e.g., for ContentTag#content_type). Unfortunately, in some cases, Rails does not use #read_attribute to access these types (specifically, when calling .preload_associations). This adds an override for the attr_reader/method associated with the attribute to be overridden. Test plan - Test affected models with old and new data with sharding enabled. In a sharded environment: - Attach an old quiz (one created prior to January) to a module - when navigating to the module, the attached content items should display correctly. Change-Id: Ibfbff5a0d5dc63f6cc3714b22fc3bf4dc04e66cb Reviewed-on: https://gerrit.instructure.com/29858 Reviewed-by: Brian Palmer <brianp@instructure.com> Tested-by: Jenkins <jenkins@instructure.com> QA-Review: Matt Fairbourn <mfairbourn@instructure.com> Product-Review: Josh Simpson <jsimpson@instructure.com> |
||
---|---|---|
.. | ||
academic_benchmark | ||
account_reports | ||
acts_as_list | ||
attachment_fu | ||
attachment_fu_regenerate_thumbnails | ||
broadcast_policy | ||
delayed_job | ||
moodle2cc | ||
qti_exporter | ||
rails_xss | ||
registration_captcha | ||
respondus_soap_endpoint | ||
simply_versioned | ||
wiziq |