rails-routes-js-utils 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -17,7 +17,7 @@ module Rails
|
|
17
17
|
static_part = this_spec.split(param_split)
|
18
18
|
dynamic_part = this_spec.scan(param_split)
|
19
19
|
dynamic_part.slice!(-1,1)
|
20
|
-
compiled_match = []
|
20
|
+
compiled_match = ['^']
|
21
21
|
compiled_replace = ["function() { return ''"]
|
22
22
|
for i in 0..[static_part.length,dynamic_part.length].max
|
23
23
|
if (static_part[i] && static_part[i].length)
|
@@ -29,6 +29,7 @@ module Rails
|
|
29
29
|
compiled_match << param_replace
|
30
30
|
end
|
31
31
|
end
|
32
|
+
compiled_match << "\/?$"
|
32
33
|
compiled_regex = Regexp.new(compiled_match.join());
|
33
34
|
compiled_replace << ";}"
|
34
35
|
|