Skip to content

Inherited entity_name is not possible #659

Closed
@jweir

Description

@jweir

What is the reasoning for using methods(false) to detect if a model has an entity_name method?

if model.methods(false).include?(:entity_name)

In my case we have several Entity classes of the same type, but in different domains. Eastern::Market, Western::Market, etc. These all inherit from a base Grape::Entity class with a custom entity_name method to output EasternMarket, or WesternMarket, etc.

After making an upgrade from an older version of grape-swagger this breaks.

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