update optimization

This commit is contained in:
Aung Myo
2018-07-05 18:19:16 +06:30
parent f0df6a80ba
commit a5bb0a6746
8 changed files with 34 additions and 28 deletions

View File

@@ -8,7 +8,6 @@ class AssignedOrderItem < ApplicationRecord
belongs_to :order_queue_station
def self.assigned_order_item (order, item_code, instance_code, order_queue_station )
AssignedOrderItem.transaction do
assigned_order_item = AssignedOrderItem.new()
assigned_order_item.order = order
assigned_order_item.item_code = item_code
@@ -17,7 +16,6 @@ class AssignedOrderItem < ApplicationRecord
assigned_order_item.print_status = false
assigned_order_item.delivery_status = false
assigned_order_item.save!
end
end
def self.assigned_order_item_by_job(order_id)