Skip to content

Wrong table annotations for models with same name, but different tables #674

Open
@jimmytang

Description

@jimmytang

Describe your problem here.
Two different models, both with the same class name. One is inside a Rails engine inside the app, the other inside the main rails app. They are pointing to different underlying PostGres tables.

When running model annotations, both models show the annotations for the model inside the main app.

The expected result should be the model inside the main app has annotations representing it's underlying table and the model inside the engine has a different set of annotations representing it's underlying table.

Commands

rake db:update_model_annotations

Version

  • annotate version
    2.7.5
  • rails version
    5.2.3
  • ruby version
    2.6.2p47

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