class Attachment
Ruby on Rails 5.2.8.1
Since v5.2.8.1Attachments associate records with blobs. Usually that’s a one record-many blobs relationship, but it is possible to associate many different records with the same blob. If you’re doing that, you’ll want to declare with has_one/many_attached :thingy, dependent: false, so that destroying any one record won’t destroy the blob as well. (Then you’ll need to do your own garbage collecting, though).
Inherits from
Methods (defined here)
- # purge
- # purge_later
Private methods
(2)
Implementation detail — not part of the public API.
Methods (inherited)
From ActiveModel::Conversion (4)
- # to_key
- # to_model
- # to_param
- # to_partial_path
From ActiveModel::Naming (7)
- # model_name
- self. param_key
- self. plural
- self. route_key
- self. singular
- self. singular_route_key
- self. uncountable?
From ActiveRecord::AttributeMethods (9)
From ActiveRecord::AutosaveAssociation (6)
From ActiveRecord::ConnectionHandling (8)
From ActiveRecord::Core (31)
- # <=>
- # ==
- # clone
- # connection_handler
- # dup
- # encode_with
- # eql?
- # freeze
- # frozen?
- # hash
- # init_with
- # inspect
- # pretty_print
- # readonly!
- # readonly?
- # slice
- self. configurations
- self. configurations=
- self. connection_handler
- self. connection_handler=
- self. default_timezone
- self. dump_schema_after_migration
- self. dump_schemas
- self. error_on_ignored_order
- self. logger
- self. new
- self. schema_format
- self. timestamped_migrations
- self. use_yaml_unsafe_load
- self. verbose_query_logs
- self. warn_on_records_fetched_greater_than
From ActiveRecord::Enum (1)
- # enum
From ActiveRecord::Inheritance (1)
From ActiveRecord::Integration (6)
- # cache_key
- # cache_key_with_version
- # cache_version
- # to_param
- self. cache_timestamp_format
- self. cache_versioning
From ActiveRecord::Locking::Pessimistic (2)
From ActiveRecord::ModelSchema (12)
- self. internal_metadata_table_name
- self. internal_metadata_table_name=
- self. pluralize_table_names
- self. pluralize_table_names=
- self. primary_key_prefix_type
- self. primary_key_prefix_type=
- self. schema_migrations_table_name
- self. schema_migrations_table_name=
- self. table_name_prefix
- self. table_name_prefix=
- self. table_name_suffix
- self. table_name_suffix=
From ActiveRecord::NoTouching (1)
From ActiveRecord::Persistence (25)
- # becomes
- # becomes!
- # decrement
- # decrement!
- # delete
- # destroy
- # destroy!
- # destroyed?
- # increment
- # increment!
- # new_record?
- # persisted?
- # reload
- # save
- # save!
- # toggle
- # toggle!
- # touch
- # update
- # update!
- # update_attribute
- # update_attributes
- # update_attributes!
- # update_column
- # update_columns
From ActiveRecord::Querying (2)
From ActiveRecord::Validations (4)
From ActiveSupport::Benchmarkable (1)
From ActiveSupport::DescendantsTracker (7)
- # descendants
- # direct_descendants
- # inherited
- self. clear
- self. descendants
- self. direct_descendants
- self. store_inherited
From Object (17)
- # acts_like?
- # blank?
- # deep_dup
- # duplicable?
- # html_safe?
- # in?
- # instance_values
- # instance_variable_names
- # presence
- # presence_in
- # present?
- # to_param
- # to_query
- # try
- # try!
- # unescape
- # with_options
From ActiveModel::AttributeAssignment (2)
From ActiveModel::AttributeMethods (4)
From ActiveModel::Translation (3)
From ActiveModel::Validations (6)
From ActiveRecord::AttributeMethods::Dirty (13)
- # attribute_before_last_save
- # attribute_change_to_be_saved
- # attribute_in_database
- # attributes_in_database
- # changed_attribute_names_to_save
- # changes_to_save
- # has_changes_to_save?
- # reload
- # saved_change_to_attribute
- # saved_change_to_attribute?
- # saved_changes
- # saved_changes?
- # will_save_change_to_attribute?
From ActiveRecord::AttributeMethods::PrimaryKey (7)
- # id
- # id=
- # id?
- # id_before_type_cast
- # id_in_database
- # id_was
- # to_key
From ActiveSupport::Autoload (6)
- # autoload
- # autoload_at
- # autoload_under
- # autoloads
- # eager_autoload
- # eager_load!