app/assets/javascripts/active_admin/lib/per_page.js.coffee in activeadmin-1.0.0.pre1 vs app/assets/javascripts/active_admin/lib/per_page.js.coffee in activeadmin-1.0.0.pre2
- old
+ new
@@ -16,11 +16,15 @@
_queryParams: ->
query = window.location.search.substring(1)
params = {}
re = /([^&=]+)=([^&]*)/g
while m = re.exec(query)
- params[decodeURIComponent(m[1])] = decodeURIComponent(m[2])
+ params[@_decode(m[1])] = @_decode(m[2])
params
+
+ _decode: (value) ->
+ #replace "+" before decodeURIComponent
+ decodeURIComponent(value.replace(/\+/g, '%20'))
$.widget.bridge 'perPage', ActiveAdmin.PerPage
$ ->
$('.pagination_per_page select').perPage()