开发者

Where do I define Sunspot/solr configuration?

开发者 https://www.devze.com 2023-03-21 10:11 出处:网络
I see in the sunspot documentation that to define the default number of results I should use: Sunspot.config.pagination.default_per_page = 12

I see in the sunspot documentation that to define the default number of results I should use:

Sunspot.config.pagination.default_per_page = 12

I have tried adding that line to application.rb but it do开发者_StackOverflow社区esn't work. Where exactly should I define this setting?


Just put it in an initializer e.g. config/initializers/sunspot.rb and it will work fine!

0

精彩评论

暂无评论...
验证码 换一张
取 消