Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.
This repository was archived by the owner on Apr 24, 2024. It is now read-only.

Inheriting measured from parent class #52

Open
@KevinVerre

Description

@KevinVerre

I ran into an issue today. I use single-table inheritance to create three subclasses for a single parent class. My original plan was to to call

measured_weight :weight

in the parent class file. I was hoping that would allow the objects of the children classes be able to accept a Measured:Weight. Instead it threw an error: measured_fields was nil and the error was that it was trying to call [ ] of a nil object.

The workaround was to add "measured_weight :weight" to each of the three subclasses.

Is this a known issue? Is there a way to fix it in the measured-rails gem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions