mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-04 15:24:23 +01:00
12 lines
456 B
Ruby
12 lines
456 B
Ruby
# frozen_string_literal: true
|
|
|
|
json.orderable_name item.orderable.reservable.name
|
|
json.orderable_slug item.orderable.reservable.slug
|
|
json.orderable_main_image_url item.orderable.reservable&.try("#{item.orderable.reservable_type.downcase}_image")&.attachment&.medium&.url
|
|
json.slots_reservations item.orderable.cart_item_reservation_slots do |sr|
|
|
json.extract! sr, :id, :offered
|
|
json.slot do
|
|
json.extract! sr.slot, :id, :start_at, :end_at
|
|
end
|
|
end
|