Skip to content

Accessing single related resource #90

@mkamensky

Description

@mkamensky

Hi,

I am getting an error message when trying to access a has_one resource, as in

/foos/7/bar

where a Foo has one Bar. I traced the problem to this line:

related_resource = source_resource.public_send(relationship_type)

It appears that the resource class does not define an accessor in this case (i.e., the Foo resource does not have bar method). But maybe I'm doing something wrong?

Thanks
Moshe

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions