Ruby - will_paginate with nice url
Im learning Ror and its causing me headache!
I just figured out one of my problems...
I tried to create a nice url using will_paginate.
I tried a lot of different ways but only this one works for me:
->using Haml template:
= will_paginate(paging, :param_name=>'&year=' + @year.to_s + '&month=' + @month.to_s + '&day=' + @day.to_s + '&time=' + @timeSpace.to_s + '&sortby=' + @sortby.to_s + '&way=' + @way.to_s+ '&message=' + @message.to_s + '&page' )
The plugin transforms the ugly path in the nice one!
http://0.0.0.0:3000/reporting/allerrors/2010/8/3/7/created_at/asc/2/
its simple, Isnt'it?
It took me almost 2 days!
I hope it will help someone else!
Commenter