Skip to content

has_one :giver, class_name: '::Contractor' #1120

@cs3b

Description

@cs3b

doesn't look for resources in the main namespace

class Mm::KudoResource < JSONAPI::Resource
  model_name 'Mm::Kudo'
  attributes :value, :tags, :comment

  has_one :giver, class_name: '::Contractor'
end````

I've got error 

```` bash
NameError: JSONAPI: Could not find resource 'mm//contractors'. (Class Mm::::ContractorResource not found)

how should I define that the relation is in the top level namespace?

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