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.
我在太阳黑子文档中看到定义我应该使用的默认结果数量:
Sunspot.config.pagination.default_per_page = 12
我曾尝试将该行添加到 application.rb 但它不起作用。我应该在哪里定义这个设置?
只需将其放入初始化程序中,例如config/initializers/sunspot.rb,它就会正常工作!
config/initializers/sunspot.rb