var dataObj = [];
// Get data service
VSS.getService(VSS.ServiceIds.ExtensionData)
// the callback on the next line returns x` promise, which the JavaScript engine will follow, so you don't need to nest the next `then`
.then((dataService) => d
阶段
我有这样的模型:
Promo(id: integer, start_date: datetime, end_date: datetime)
我想知道目前的促销活动是什么。可能是我们的查询应该是:
SELECT * FROM promos WHERE now BETWEEN start_date AND end_date;
问题
我该怎么用Ruby做呢?哪种方法是正确的?
谢谢。