I have a Posts resource and a User Rating resource.
In mine, routes.rbI put a user rating in posts:
jsonapi_resources :posts do
jsonapi_resources :user_ratings
end
This correctly showed the end point /posts/{id}/user-ratings.
However, when testing this endpoint with, {id}it returns everything user-ratings, not just those user-ratingsassociated with this message.
In my resource I have tried to add a message: has_many :user_ratingsI tried to add to user ratings has_one :post.
In my models, I added has_manyand belongs_to.
However, I am not trying to do anything to make the api return only user ratings associated with a specific post id.
Any insight would be appreciated, thanks.