class ActionText::FixtureSet

def self.attachment(fixture_set_name, label, column_type: :integer)


body:
Hello, <%= ActionText::FixtureSet.attachment("articles", :first) %>

name: content
record: second (Article)
second:

in the body: value in test/fixtures/action_text/rich_texts.yml:
content by embedding a call to ActionText::FixtureSet.attachment
You can attach a mention of articles(:first) to second's

title: Another Article
second:

test/fixtures/articles.yml:
For example, consider a second Article fixture declared in

=== Examples

HTML.
Fixtures support Action Text attachments as part of their body
def self.attachment(fixture_set_name, label, column_type: :integer)
  signed_global_id = ActiveRecord::FixtureSet.signed_global_id fixture_set_name, label,
    column_type: column_type, for: ActionText::Attachable::LOCATOR_NAME
  %(<action-text-attachment sgid="#{signed_global_id}"></action-text-attachment>)
end