kz363/SparkGather — pull request #31 by tihuan (2014-09-30 16:59:50+00:00)
Title: Pagination

Update pagination partial and related helpers to allow options so pagination will work for the following cases:

http://localhost:3000/?page=1
http://localhost:3000/users?c=GuideSpark&page=1

bugs:

1. Currently http://localhost:3000/users?c=GuideSpark&page=1 will show an extra query path=users.. which is potentially unsafe?

2. Inside _pagination.html.erb, line 3 shows <% options ||= {} %>. Which basically means declaring a variable inside a view file. I'm not sure how we can refactor this..