lib/jsonapi/include_directives.rb in jsonapi-resources-0.9.3 vs lib/jsonapi/include_directives.rb in jsonapi-resources-0.9.4

- old
+ new

@@ -38,9 +38,19 @@ def paths delve_paths(get_includes(@include_directives_hash, false)) end + def merge_filter(relation, filter) + config = include_config(relation.to_sym) + config[:include_filters] ||= {} + config[:include_filters].merge!(filter) + end + + def include_config(relation) + @include_directives_hash[:include_related][relation] + end + private def get_related(current_path) current = @include_directives_hash current_resource_klass = @resource_klass