lib/jsonapionify/api/relationship/many.rb in jsonapionify-0.10.2 vs lib/jsonapionify/api/relationship/many.rb in jsonapionify-0.11.0

- old
+ new

@@ -14,11 +14,11 @@ callbacks: callbacks, cacheable: true, prepend: 'relationships' } define_action(:show, 'GET', **options, &block).response status: 200 do |context| - context.response_object[:data] = build_identifier_collection(context.collection) + context.response_object[:data] = build_resource_identifier_collection(collection: context.collection) context.response_object.to_json end end define_singleton_method(:replace) do |content_type: nil, callbacks: true, &block| @@ -28,11 +28,11 @@ cacheable: false, prepend: 'relationships', example_input: :resource_identifier } define_action(:replace, 'PATCH', **options, &block).response status: 200 do |context| - context.response_object[:data] = build_identifier_collection(context.collection) + context.response_object[:data] = build_resource_identifier_collection(collection: context.collection) context.response_object.to_json end end define_singleton_method(:add) do |content_type: nil, callbacks: true, &block| @@ -42,11 +42,11 @@ cacheable: false, prepend: 'relationships', example_input: :resource_identifier } define_action(:add, 'POST', **options, &block).response status: 200 do |context| - context.response_object[:data] = build_identifier_collection(context.collection) + context.response_object[:data] = build_resource_identifier_collection(collection: context.collection) context.response_object.to_json end end define_singleton_method(:remove) do |content_type: nil, callbacks: true, &block| @@ -57,10 +57,10 @@ prepend: 'relationships', example_input: :resource_identifier } options[:prepend] = 'relationships' define_action(:remove, 'DELETE', **options, &block).response status: 200 do |context| - context.response_object[:data] = build_identifier_collection(context.collection) + context.response_object[:data] = build_resource_identifier_collection(collection: context.collection) context.response_object.to_json end end context :scope do |context|