File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed
activestorage/app/models/active_storage Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change 15
15
# update a blob's metadata on a subsequent pass, but you should not update the key or change the uploaded file.
16
16
# If you need to create a derivative or otherwise change the blob, simply create a new blob and purge the old one.
17
17
class ActiveStorage ::Blob < ActiveStorage ::Record
18
- # We use constant paths in the following include calls to avoid a gotcha of
19
- # classic mode: If the parent application defines a top-level Analyzable, for
20
- # example, and ActiveStorage::Blob::Analyzable is not yet loaded, a bare
21
- #
22
- # include Analyzable
23
- #
24
- # would resolve to the top-level one, const_missing would not be triggered,
25
- # and therefore ActiveStorage::Blob::Analyzable would not be autoloaded.
26
- #
27
- # By using qualified names, we ensure const_missing is invoked if needed.
28
- # Please, note that Ruby 2.5 or newer is required, so Object is not checked
29
- # when looking up the ancestors of ActiveStorage::Blob.
30
- #
31
- # Zeitwerk mode does not have this gotcha. If we ever drop classic mode, this
32
- # can be simplified, bare constant names would just work.
33
- include ActiveStorage ::Blob ::Analyzable
34
- include ActiveStorage ::Blob ::Identifiable
35
- include ActiveStorage ::Blob ::Representable
18
+ include Analyzable
19
+ include Identifiable
20
+ include Representable
36
21
37
22
self . table_name = "active_storage_blobs"
38
23
You can’t perform that action at this time.
0 commit comments