Skip to content

Fix incorrect reference for renamed model associations#668

Merged
crmne merged 1 commit intocrmne:mainfrom
jayelkaake:main
Mar 10, 2026
Merged

Fix incorrect reference for renamed model associations#668
crmne merged 1 commit intocrmne:mainfrom
jayelkaake:main

Conversation

@jayelkaake
Copy link
Contributor

@jayelkaake jayelkaake commented Mar 10, 2026

What this does

Resolves unknown attribute 'model' for CustomMessageClass error which occurs when you try to use with_model on an ActiveRecord Chat class that has a custom Message class name using the acts_as.

It appears to be a small typo.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Performance improvement

Scope check

  • I read the Contributing Guide
  • This aligns with RubyLLM's focus on LLM communication
  • This isn't application-specific logic that belongs in user code
  • This benefits most users, not just my specific use case

Quality check

  • I ran overcommit --install and all hooks pass
  • I tested my changes thoroughly
    • For provider changes: Re-recorded VCR cassettes with bundle exec rake vcr:record[provider_name] N/A
    • All tests pass: bundle exec rspec
  • I updated documentation if needed N/A
  • I didn't modify auto-generated files manually (models.json, aliases.json)

AI-generated code

  • I used AI tools to help write this code
  • I have reviewed and understand all generated code (required if above is checked)

API changes

  • Breaking change
  • New public methods/classes
  • Changed method signatures
  • No API changes

@jayelkaake
Copy link
Contributor Author

@crmne thanks for the quick review!

@crmne
Copy link
Owner

crmne commented Mar 10, 2026

@crmne thanks for the quick review!

Bug fixes like these are very important. Thanks for the PR!

@crmne crmne merged commit bdf677a into crmne:main Mar 10, 2026
21 checks passed
@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.41%. Comparing base (0b39814) to head (4005e07).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #668   +/-   ##
=======================================
  Coverage   81.41%   81.41%           
=======================================
  Files         116      116           
  Lines        5489     5489           
  Branches     1433     1433           
=======================================
  Hits         4469     4469           
  Misses       1020     1020           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants