rails-routes-js-utils 1.1.4 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -46,8 +46,12 @@ module Rails
|
|
46
46
|
|
47
47
|
js = [];
|
48
48
|
dig(route.path.spec,js)
|
49
|
+
compiled_verb = route.verb.to_javascript
|
50
|
+
if compiled_verb == '//'
|
51
|
+
compiled_verb = '/.*/'
|
52
|
+
end
|
49
53
|
if route.name
|
50
|
-
"addRouteToEnv({name: '#{route.name}', path: #{compiled_regex}, subdomain: #{subdomain_regex} , reqs: #{reqs.to_json}, replace: function(opts) { return #{js.join('+')}; } });"
|
54
|
+
"addRouteToEnv({name: '#{route.name}', path: #{compiled_regex}, subdomain: #{subdomain_regex} , reqs: #{reqs.to_json}, replace: function(opts) { return #{js.join('+')}; }, verb: #{compiled_verb} });"
|
51
55
|
end
|
52
56
|
end.join("\n");
|
53
57
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-routes-js-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|