Skip to content

Relationship routes are created without adding them in the routes.rb #361

@xdmx

Description

@xdmx

I've defined the following Resource:

class CommentResource < BaseResource
      has_one :activity
      has_one :user
end

 class ActivityResource < BaseResource
      has_many :comments
end

jsonapi_resources :activities, only: %w(index show)
jsonapi_resources :comments, only: %w(create destroy index show)

And checking with rake routes I see that it also created all the relationship/related routes for both Activity and Comment even if I haven't added jsonapi_links / jsonapi_related_resources in the routes file

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions