diff options
author | Alex Gomez <alex.gomez@shopify.com> | 2019-06-06 10:29:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-06 10:29:45 -0400 |
commit | a057569685471fc668b269bfa6f4c282b09e399e (patch) | |
tree | 7350c989d91d868c202aee3b8f08294f4a817d78 /railties/lib/rails/app_loader.rb | |
parent | 480d9f2d2431e6a11c89edb45123181f9b6db958 (diff) | |
download | rails-a057569685471fc668b269bfa6f4c282b09e399e.tar.gz rails-a057569685471fc668b269bfa6f4c282b09e399e.tar.bz2 rails-a057569685471fc668b269bfa6f4c282b09e399e.zip |
Include warning in docs about polymorphism in underlying tables
We had a bug whereby we changed the namespace on a model using ActiveStorage, which resulted in broken download links. The reason this happened is because the `active_storage_attachments` table is a polymorphic join table that records the model's class name at the time of record creation, and uses this `record_type` in queries. Since the model namespace changed, the queries did not return the blob as expected. Discussed with @rafaelfranca, who suggested adding a warning about this in the docs.
Diffstat (limited to 'railties/lib/rails/app_loader.rb')
0 files changed, 0 insertions, 0 deletions