Sha256: 7c8c343a10613bb9f10b626f481347794d148f66a13b246debb0dee9367ec75f

Contents?: true

Size: 666 Bytes

Versions: 115

Compression:

Stored size: 666 Bytes

Contents

# frozen_string_literal: true

require "active_support/core_ext/module/delegation"

module ActiveStorage
  # 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

115 entries across 111 versions & 10 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/activestorage-7.0.8.7/lib/active_storage/attached.rb
activestorage-7.0.8.7 lib/active_storage/attached.rb
activestorage-7.0.8.6 lib/active_storage/attached.rb
activestorage-6.1.7.10 lib/active_storage/attached.rb
activestorage-6.1.7.9 lib/active_storage/attached.rb
activestorage-7.0.8.5 lib/active_storage/attached.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/activestorage-7.0.8.4/lib/active_storage/attached.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/activestorage-7.0.5.1/lib/active_storage/attached.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/activestorage-7.0.5.1/lib/active_storage/attached.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/activestorage-7.0.5.1/lib/active_storage/attached.rb
activestorage-7.0.8.4 lib/active_storage/attached.rb
activestorage-6.1.7.8 lib/active_storage/attached.rb
activestorage-7.0.8.1 lib/active_storage/attached.rb
activestorage-6.1.7.7 lib/active_storage/attached.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activestorage-7.0.3.1/lib/active_storage/attached.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activestorage-7.0.2.3/lib/active_storage/attached.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activestorage-6.1.6.1/lib/active_storage/attached.rb
activestorage-7.0.8 lib/active_storage/attached.rb
activestorage-7.0.7.2 lib/active_storage/attached.rb
activestorage-6.1.7.6 lib/active_storage/attached.rb