Removing obsolete rabl templates

This commit is contained in:
Rob Harrington
2015-05-20 11:52:49 +10:00
parent 0ad2978926
commit c56efabfbe
5 changed files with 0 additions and 32 deletions

View File

@@ -1,5 +0,0 @@
object @line_item
attributes :id, :quantity, :max_quantity
node( :supplier ) { |li| partial 'api/enterprises/bulk_show', :object => li.product.supplier }
node( :units_product ) { |li| partial 'spree/api/products/units_show', :object => li.product }
node( :units_variant ) { |li| partial 'spree/api/variants/units_show', :object => li.variant }

View File

@@ -1,2 +0,0 @@
collection @orders.order('id ASC')
extends "spree/api/orders/bulk_show"

View File

@@ -1,14 +0,0 @@
object @order
attributes :id, :number
node( :full_name ) { |order| order.billing_address.nil? ? "" : ( order.billing_address.full_name || "" ) }
node( :email ) { |order| order.email || "" }
node( :phone ) { |order| order.billing_address.nil? ? "a" : ( order.billing_address.phone || "" ) }
node( :completed_at ) { |order| order.completed_at.blank? ? "" : order.completed_at.strftime("%F %T") }
node( :distributor ) { |order| partial 'api/enterprises/bulk_show', :object => order.distributor }
node( :order_cycle ) { |order| partial 'api/order_cycles/bulk_show', :object => order.order_cycle }
node( :line_items ) do |order|
order.line_items.managed_by(@current_api_user).order('id ASC').map do |line_item|
partial 'spree/api/line_items/bulk_show', :object => line_item
end
end

View File

@@ -1,2 +0,0 @@
object @product
attributes :id, :name, :group_buy_unit_size, :variant_unit

View File

@@ -1,9 +0,0 @@
object @variant
attributes :id
node( :unit_text ) do |v|
options_text = v.options_text
v.product.name + (options_text.empty? ? "" : ": #{options_text}")
end
node( :unit_value ) { |v| v.unit_value }