papriwalprateek / dqalpha

www.daqwest.com
1 stars 0 forks source link

pagination links submitting search param also #33

Closed vinayrajchoudhary closed 10 years ago

vinayrajchoudhary commented 10 years ago

on clicking pagination links if there is a searched query in search portion that also gets sent again like http://localhost:3000/quests/207/search?page=5&search=smooth

vinayrajchoudhary commented 10 years ago

temoporary workaround by setting controller to quest_controller's show method but still the links are in this form - http://localhost:3000/users/207/quests/207/search?page=5&search=smooth , having unnecessary users and users' id which might create problems later, needs to be looked into later. Current patch is following:- <%= will_paginate(@qs, :params => { :controller => "quests", :action => "show" }) %>

some useful links to change will_paginate links http://thewebfellas.com/blog/2010/8/22/revisited-roll-your-own-pagination-links-with-will_paginate-and-rails-3