Use serialized_data

This commit is contained in:
François Turbelin
2020-05-06 21:55:04 +02:00
parent f6e06b5658
commit 13f00480ce
2 changed files with 5 additions and 5 deletions

View File

@@ -18,11 +18,11 @@ module DfcProvider
inventory_variants.
includes(:product, :inventory_items)
products_json = ::DfcProvider::ProductSerializer.
serialized_data = ::DfcProvider::ProductSerializer.
new(products, base_url).
serialized_json
serialized_data
render json: products_json
render json: serialized_data
end
private

View File

@@ -9,7 +9,7 @@ module DfcProvider
@base_url = base_url
end
def serialized_json
def serialized_data
{
"@context" =>
{
@@ -18,7 +18,7 @@ module DfcProvider
},
"@id" => "/enterprise/products",
"DFC:supplies" => serialized_products
}.to_json
}
end
private