I would need to filter the records to include for has_many relation with the params that are passed to the serializer. The object_method_name
option is invoking a method in the model, but how can I pass the params to the method?
Or is there a way to use a Proc for getting the records for has_many relation? Couldn't find any documentation for that at least.
Found it. You can give a block to it