class JSONAPI::Renderer::SimpleResourcesProcessor
@api private
Public Instance Methods
process_resources()
click to toggle source
# File lib/jsonapi/renderer/simple_resources_processor.rb, line 7 def process_resources [@primary, @included].each do |resources| resources.map! do |res| ri = [res.jsonapi_type, res.jsonapi_id] include_dir = @include_rels[ri] fields = @fields[res.jsonapi_type.to_sym] res.as_jsonapi(include: include_dir, fields: fields) end end end