lib/routes.js.coffee in js-routes-0.9.2 vs lib/routes.js.coffee in js-routes-0.9.3
- old
+ new
@@ -139,9 +139,11 @@
#
# This method convert value for globbing in right value for rails route
#
visit_globbing: (route, parameters, optional) ->
[type, left, right] = route
+ # fix for rails 4 globbing
+ route[1] = left = left.replace(/^\*/i, "") if left.replace(/^\*/i, "") isnt left
value = parameters[left]
return @visit(route, parameters, optional) unless value?
parameters[left] = switch @get_object_type(value)
when "array"
value.join("/")