lib/subj_models/order.rb in subj_models-0.5.2 vs lib/subj_models/order.rb in subj_models-0.5.3
- old
+ new
@@ -50,9 +50,11 @@
.where("users.id" => user_id)
.where(order_items: {item_type: 1})
.last
end
+ scope :has_items, -> { joins(:order_items).where.not(order_items: {order_id: nil}).uniq }
+
end
end
def order_status_value
\ No newline at end of file