Sha256: 8fb23d3cd1fb1649c08c4c6e63f59b4970b765d53f7cf0ae48d2d3efcb6996cb

Contents?: true

Size: 297 Bytes

Versions: 76

Compression:

Stored size: 297 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

76 entries across 76 versions & 7 rubygems

Version Path
activestorage-6.0.4 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.0.3.7 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.1.3.2 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.1.3.1 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.0.3.6 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.1.3 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.1.2.1 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.0.3.5 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.1.2 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.1.1 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.1.0 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.1.0.rc2 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.1.0.rc1 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.0.3.4 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.0.3.3 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.0.3.2 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.0.3.1 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.0.3 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.0.3.rc1 lib/active_storage/attached/changes/create_one_of_many.rb
activestorage-6.0.2.2 lib/active_storage/attached/changes/create_one_of_many.rb