开发者

Where do I define Sunspot/solr configuration?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜