Sha256: 8effc18674f4e0f531789b6fd158ed363a8e9e6895f58f2d78f467398f9377e9

Contents?: true

Size: 298 Bytes

Versions: 56

Compression:

Stored size: 298 Bytes

Contents

# frozen_string_literal: true

module ActiveStorage
  class Attached::Changes::CreateOneOfMany < Attached::Changes::CreateOne # :nodoc:
    private
      def find_attachment
        record.public_send("#{name}_attachments").detect { |attachment| attachment.blob_id == blob.id }
      end
  end
end

Version data entries

56 entries across 53 versions & 6 rubygems

Version Path
activestorage-7.0.4.1 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-7.0.4 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-7.0.3.1 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-7.0.3 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-7.0.2.4 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-7.0.2.3 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-7.0.2.2 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-7.0.2.1 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-7.0.2 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-7.0.1 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-7.0.0 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-7.0.0.rc3 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-7.0.0.rc2 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-7.0.0.rc1 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-7.0.0.alpha2 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-7.0.0.alpha1 lib/active_storage/attached/changes/create_one_of_many.rb