Sha256: 016195803927aa18bb4e912a6d23593cb30707a5347a1ee5f043d6074179fbe1

Contents?: true

Size: 701 Bytes

Versions: 40

Compression:

Stored size: 701 Bytes

Contents

# frozen_string_literal: true

require "active_support/core_ext/module/delegation"

module ActiveStorage
  # = Active Storage \Attached
  #
  # Abstract base class for the concrete ActiveStorage::Attached::One and ActiveStorage::Attached::Many
  # classes that both provide proxy access to the blob association for a record.
  class Attached
    attr_reader :name, :record

    def initialize(name, record)
      @name, @record = name, record
    end

    private
      def change
        record.attachment_changes[name]
      end
  end
end

require "active_storage/attached/model"
require "active_storage/attached/one"
require "active_storage/attached/many"
require "active_storage/attached/changes"

Version data entries

40 entries across 40 versions & 5 rubygems

Version Path
activestorage-8.0.2 lib/active_storage/attached.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/activestorage-7.1.3.4/lib/active_storage/attached.rb
activestorage-8.0.1 lib/active_storage/attached.rb
activestorage-8.0.0.1 lib/active_storage/attached.rb
activestorage-7.2.2.1 lib/active_storage/attached.rb
activestorage-7.1.5.1 lib/active_storage/attached.rb
activestorage-8.0.0 lib/active_storage/attached.rb
activestorage-7.2.2 lib/active_storage/attached.rb
activestorage-7.1.5 lib/active_storage/attached.rb
activestorage-8.0.0.rc2 lib/active_storage/attached.rb
activestorage-7.2.1.2 lib/active_storage/attached.rb
activestorage-7.1.4.2 lib/active_storage/attached.rb
activestorage-8.0.0.rc1 lib/active_storage/attached.rb
activestorage-7.2.1.1 lib/active_storage/attached.rb
activestorage-7.1.4.1 lib/active_storage/attached.rb
activestorage-8.0.0.beta1 lib/active_storage/attached.rb
omg-activestorage-8.0.0.alpha9 lib/active_storage/attached.rb
omg-activestorage-8.0.0.alpha8 lib/active_storage/attached.rb
omg-activestorage-8.0.0.alpha7 lib/active_storage/attached.rb
omg-activestorage-8.0.0.alpha4 lib/active_storage/attached.rb