lib/jsonapi/relationship_builder.rb in jsonapi-resources-0.9.1.beta2 vs lib/jsonapi/relationship_builder.rb in jsonapi-resources-0.9.2
- old
+ new
@@ -58,9 +58,11 @@
relation_name = relationship.relation_name(context: @context)
records = records_for(relation_name)
resource_klass = relationship.resource_klass
+ records = resource_klass.apply_includes(records, options)
+
filters = options.fetch(:filters, {})
unless filters.nil? || filters.empty?
records = resource_klass.apply_filters(records, filters, options)
end