Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有以下
@articles = Article.find_all_by_published(true)
我如何将其限制为仅显示 3 条记录,但仍需要包含已发布(真实)条件
提前致谢
@articles = Article.limit(3).find_all_by_published(true)
我搜索了几个例子,仍然没有得到。我正在将一个 GOOD 对象列表从控制器传递到 jsp 页面。试图循环列表对象,但它只重复显示一个元素。我应该用豆子吗?如果是,您能否为我的案例提供更具体的示例。
<c:if test="${not empty listGood}"> <c:forEach var="ob"