Update models, views, and fixtures for polymorphic reactions
- Reaction: belongs_to :reactable (polymorphic) instead of :comment - Comment: has_many :reactions with as: :reactable - Views: use reaction.reactable instead of reaction.comment - Fixtures: use polymorphic syntax for reactable association Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Vendored
+2
-2
@@ -2,12 +2,12 @@ kevin:
|
||||
id: <%= ActiveRecord::FixtureSet.identify("kevin_reaction", :uuid) %>
|
||||
account: 37s_uuid
|
||||
content: "👍"
|
||||
comment: logo_agreement_jz_uuid
|
||||
reactable: logo_agreement_jz_uuid (Comment)
|
||||
reacter: kevin_uuid
|
||||
|
||||
david:
|
||||
id: <%= ActiveRecord::FixtureSet.identify("david_reaction", :uuid) %>
|
||||
account: 37s_uuid
|
||||
content: "👍"
|
||||
comment: logo_agreement_jz_uuid
|
||||
reactable: logo_agreement_jz_uuid (Comment)
|
||||
reacter: david_uuid
|
||||
|
||||
Reference in New Issue
Block a user