Skip to content

Prism does not handle dynamically resolved classes #740

@JochenLutz

Description

@JochenLutz

We use single-table inheritance in our application.

Therefore we sometimes have to dynamically resolve the class of ActiveRecord instances to use #human_attribute_name (like in @cable.class.human_attribute_name(:category)).

This is reported as missing translation activerecord.attributes.class.category.

I'm not sure what the best action is when #human_attribute_name is called something different than a class/constant. It would be great if i18n-tasks did some static code analysis to deduct the class of @cable. Or some magic comment that hints at the correct class to resolve the usage.

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