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:
Mike Dalessio
2026-01-21 12:05:32 -05:00
parent 1570c16f67
commit ffab4cad6f
5 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -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