Flowdock
method

create_or_find_record

Importance_0
v6.1.7.7 - Show latest stable - 0 notes - Class: VariantWithRecord
create_or_find_record(image:) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activestorage/app/models/active_storage/variant_with_record.rb, line 42
    def create_or_find_record(image))
      @record =
        ActiveRecord::Base.connected_to(role: ActiveRecord::Base.writing_role) do
          blob.variant_records.create_or_find_by!(variation_digest: variation.digest) do |record|
            record.image.attach(image)
          end
        end
    end
Register or log in to add new notes.