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.
我正在 rails3.2 中构建一个图书馆管理应用程序。我正在尝试生成用于测试目的的书名。是否可以使用 faker gem 生成这样的书名?
让我们将其发布为答案:
Faker::Lorem.words(number_of_words)
调整number_of_words到你想要的。
number_of_words