Skip to content

ActiveRecord::ActsAs foreign keys are broken when class names change #150

@timaro

Description

@timaro

I've been trying to use the library with class names changed to something other than the default (e.g. LLMChat, LLMMessage, LLMToolCall). The various acts_as_* methods have options to override the class names, but the code still breaks in a variety of places because the foreign keys are not overridden, and also the code makes explicit references to tool_call_id and the like.

(edit: I had pasted some code in here earlier as an example, but realized later that this example was wrong. please see the attached PR for details, now that I have one.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions