Skip to content

Commit bcd19d9

Browse files
authored
Merge pull request rails#47841 from p8/docs/headers-activestorage
Add missing headers to Active Storage docs [ci-skip]
2 parents de0b99a + 0e7cb8d commit bcd19d9

26 files changed

+50
-0
lines changed

activestorage/app/models/active_storage/attachment.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
require "active_support/core_ext/module/delegation"
44

5+
# = Active Storage \Attachment
6+
#
57
# Attachments associate records with blobs. Usually that's a one record-many blobs relationship,
68
# but it is possible to associate many different records with the same blob. A foreign-key constraint
79
# on the attachments table prevents blobs from being purged if they’re still attached to any records.

activestorage/app/models/active_storage/blob.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# frozen_string_literal: true
22

3+
# = Active Storage \Blob
4+
#
35
# A blob is a record that contains the metadata about a file and a key for where that file resides on the service.
46
# Blobs can be created in two ways:
57
#

activestorage/app/models/active_storage/blob/analyzable.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
require "active_storage/analyzer/null_analyzer"
44

5+
# = Active Storage \Blob \Analyzable
56
module ActiveStorage::Blob::Analyzable
67
# Extracts and stores metadata from the file associated with this blob using a relevant analyzer. Active Storage comes
78
# with built-in analyzers for images and videos. See ActiveStorage::Analyzer::ImageAnalyzer and

activestorage/app/models/active_storage/blob/identifiable.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# frozen_string_literal: true
22

3+
# = Active Storage \Blob \Identifiable
34
module ActiveStorage::Blob::Identifiable
45
def identify
56
identify_without_saving

activestorage/app/models/active_storage/filename.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# frozen_string_literal: true
22

3+
# = Active Storage \Filename
4+
#
35
# Encapsulates a string representing a filename to provide convenient access to parts of it and sanitization.
46
# A Filename instance is returned by ActiveStorage::Blob#filename, and is comparable so it can be used for sorting.
57
class ActiveStorage::Filename

activestorage/app/models/active_storage/preview.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# frozen_string_literal: true
22

3+
# = Active Storage \Preview
4+
#
35
# Some non-image blobs can be previewed: that is, they can be presented as images. A video blob can be previewed by
46
# extracting its first frame, and a PDF blob can be previewed by extracting its first page.
57
#

activestorage/app/models/active_storage/variant.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# frozen_string_literal: true
22

3+
# = Active Storage \Variant
4+
#
35
# Image blobs can have variants that are the result of a set of transformations applied to the original.
46
# These variants are used to create thumbnails, fixed-size avatars, or any other derivative image from the
57
# original.

activestorage/app/models/active_storage/variant_with_record.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# frozen_string_literal: true
22

3+
# = Active Storage \Variant With Record
4+
#
35
# Like an ActiveStorage::Variant, but keeps detail about the variant in the database as an
46
# ActiveStorage::VariantRecord. This is only used if +ActiveStorage.track_variants+ is enabled.
57
class ActiveStorage::VariantWithRecord

activestorage/app/models/active_storage/variation.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
require "marcel"
44

5+
# = Active Storage \Variation
6+
#
57
# A set of transformations that can be applied to a blob to create a variant. This class is exposed via
68
# the ActiveStorage::Blob#variant method and should rarely be used directly.
79
#

activestorage/lib/active_storage/analyzer.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# frozen_string_literal: true
22

33
module ActiveStorage
4+
# = Active Storage \Analyzer
5+
#
46
# This is an abstract base class for analyzers, which extract metadata from blobs. See
57
# ActiveStorage::Analyzer::VideoAnalyzer for an example of a concrete subclass.
68
class Analyzer

0 commit comments

Comments
 (0)