Will_paginate Plugin on two objects on same page

后端 未结 1 816
南方客
南方客 2020-12-29 09:23

Hello I am using will_paginte plugin on two objects on a same page. Like on stackoverflow. There is a profile page on which there is a pagination on two things QUestions an

相关标签:
1条回答
  • 2020-12-29 09:43

    You can specify a :param_name option to tell will_paginate the name of the parameter to use for the page number within URLs (the default is :page). So you could do:

    <%= will_paginate @questions, :param_name => 'questions_page' %>
    <%= will_paginate @answers, :param_name => 'answers_page' %>
    
    • will_paginate documentation
    0 讨论(0)
提交回复
热议问题