Skip to content

Commit b8fb0ce

Browse files
authored
Merge pull request rails#50472 from seanpdoyle/action-text-fixtureset
Read `ActionText::Attachment.tag_name` in Action Text Fixtures
2 parents e7458f9 + c3727ec commit b8fb0ce

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

actiontext/lib/action_text/fixture_set.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def self.attachment(fixture_set_name, label, column_type: :integer)
6262
signed_global_id = ActiveRecord::FixtureSet.signed_global_id fixture_set_name, label,
6363
column_type: column_type, for: ActionText::Attachable::LOCATOR_NAME
6464

65-
%(<action-text-attachment sgid="#{signed_global_id}"></action-text-attachment>)
65+
%(<#{Attachment.tag_name} sgid="#{signed_global_id}"></#{Attachment.tag_name}>)
6666
end
6767
end
6868
end
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
hello_alice_message_content:
22
record: hello_alice (Message)
33
name: content
4-
body: <p>Hello, <%= ActionText::FixtureSet.attachment("people", :alice) %></p>
4+
body: <div>Hello, <%= ActionText::FixtureSet.attachment("people", :alice) %></div>
55

66
hello_world_review_content:
77
record: hello_world (Review)
88
name: content
9-
body: <p><%= ActionText::FixtureSet.attachment("messages", :hello_world) %> is great!</p>
9+
body: <div><%= ActionText::FixtureSet.attachment("messages", :hello_world) %> is great!</div>

0 commit comments

Comments
 (0)