Skip to content

Conversation

@dpaluy
Copy link
Owner

@dpaluy dpaluy commented Jan 6, 2026

Summary

  • Fix outdated user parameter references to actor in README examples
  • Add dedicated "Actor Association" section documenting the polymorphic actor/trackable association

Changes

  1. Table of Contents: Added "Actor Association" link
  2. Parameter documentation: Updated useractor in parameter list and code examples
  3. New section (lines 536-670): Comprehensive documentation covering:
    • Why use the actor association (filtering, audit trails, usage tracking)
    • How to pass actor via TraceBook.record! and ActiveSupport::Notifications
    • Backwards compatibility note (trackable alias)
    • Query scopes (by_actor, by_actor_type, by_actor_id)
    • Common patterns (per-user and per-conversation tracking)
    • Dashboard display behavior

Test plan

  • All tests pass (bundle exec rake test)
  • Rubocop passes with no offenses
  • Documentation-only change, no code impact

Closes #28

- Fix outdated `user` parameter references to `actor` in examples
- Add dedicated "Actor Association" section explaining:
  - Why to use the polymorphic actor association
  - How to pass actor via TraceBook.record! and adapters
  - Backwards compatibility with `trackable` alias
  - Query scopes for filtering by actor
  - Common patterns for per-user and per-conversation tracking
  - Dashboard display behavior

Closes #28
@dpaluy dpaluy merged commit 7e09abb into master Jan 6, 2026
2 checks passed
@dpaluy dpaluy deleted the feature/document-trackable-association-usage branch January 6, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Document trackable association usage for host apps

2 participants