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)