rails-routes-js-utils 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,7 @@ module Rails
|
|
11
11
|
compiled_regex = route.path.to_regexp.to_javascript
|
12
12
|
reqs = route.defaults.merge(parts: route.parts)
|
13
13
|
if route.name
|
14
|
-
"addRouteToEnv({name: '#{route.name}', path: #{compiled_regex} , reqs: #{reqs}});"
|
14
|
+
"addRouteToEnv({name: '#{route.name}', path: #{compiled_regex} , reqs: #{reqs.to_json}});"
|
15
15
|
end
|
16
16
|
end.join("\n");
|
17
17
|
end
|