-
Notifications
You must be signed in to change notification settings - Fork 65
Closed
Milestone
Description
I am using this url http://localhost:3000/api/v2/posts?filter[id]=1.
But its retrun all posts in my database.
I have defind @allowed_filtered_fields = %i[id number]
And i have this code that excute at the end but filtered.result retrun all resources
jsonapi_filter(@resources, @allowed_filtered_fields) do |filtered|
@resource_count = filtered.result.count
jsonapi_paginate(filtered.result) do |paginated|
render jsonapi: paginated
end
end
I also noted that the output of jsonapi_filter_params function is {}
Any help please ?
- Version: 1.7
- Ruby version: 2.7.2
- Rails 6.0.3
davidalejandroaguilar
Metadata
Metadata
Assignees
Labels
No labels