Rails3: How to pass param into custom will_paginate renderer?

后端 未结 2 1431
心在旅途
心在旅途 2021-02-13 18:17

I\'ve got a custom will_paginate renderer that overrides WillPaginate::ViewHelpers::LinkRenderer\'s link method like so:

   def link(text, target, attributes = {         


        
2条回答
  •  青春惊慌失措
    2021-02-13 18:46

    will_paginate lets you pass in :params for the links:

    will_paginate(@user_friends, :params => { :user_id => 95 })
    

提交回复
热议问题