-
Alexandre Ruban authored
Before this commit, using ActionText and calling `#as_json` on a non-persisted `ActiveStorage::Blob` raised an error. This is because `ActionText::Attachable` is included in `ActiveStorage::Blob` and overrides the `#as_json` method to expose a global signed id. However, a global signed id can only be generated on a persisted instance. This commit fixes the issue by making sure the blob is persisted before exposing the global signed id.
Alexandre Ruban authoredBefore this commit, using ActionText and calling `#as_json` on a non-persisted `ActiveStorage::Blob` raised an error. This is because `ActionText::Attachable` is included in `ActiveStorage::Blob` and overrides the `#as_json` method to expose a global signed id. However, a global signed id can only be generated on a persisted instance. This commit fixes the issue by making sure the blob is persisted before exposing the global signed id.
Loading