0

I have a relation has_and_belongs_to_many between class Consultant and class Company with join_table OtherCompaniesOtherConsultants. I would like to give the possibility to modify the OtherCompanies of a Consultant from the RecruiterResource (I have a model_name in my RecruiterResource to Consultant and another in my EntitiesResource to Company).

I have this lines :

In RecruiterResource : relationship :other_companies, to: :many, relation_name: "consultants_companies" In EntityResource : relationship :other_consultants, to: :many, relation_name: "consultants_companies" In routes.rb : jsonapi_resources :entities and jsonapi_resources :recruiters do jsonapi_relationships end

I have this error : NameError: JSONAPI: Could not find resource 'api/v3/company'. (Class API::V3::CompanyResource not found)

Axel_vdbl
  • 59
  • 8

0 Answers0