reactive-router 0.7.9 → 0.7.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/reactive-router/router.rb +7 -0
- data/lib/reactive-router/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64e530a6af47e431072eb9b1f0885fbd1dff9485
|
4
|
+
data.tar.gz: a5d4b3a61c4ca4b4a75342fc1ee00cfff363a1c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd05f416e8963820d59dbd67198298b5748741838b33e111622e34c897b30db6cae4543dbf5daf9ae05064bc94e89dac5add666076811ef426da9b6d7f746563
|
7
|
+
data.tar.gz: 8379a56770fd5cbb305401df4c5b8b79d4fb0b33e08f1818b46921b0db8475b16378be3ace4160931212b667b3d5e502f0713d97398a21be98f9da48cc572d05
|
@@ -21,6 +21,8 @@ module React
|
|
21
21
|
|
22
22
|
class << self
|
23
23
|
|
24
|
+
attr_accessor :router_context
|
25
|
+
|
24
26
|
def get_path
|
25
27
|
path = `#{@router_component}.native.getPath()`
|
26
28
|
path = nil if `typeof path === 'undefined'`
|
@@ -129,6 +131,11 @@ module React
|
|
129
131
|
|
130
132
|
def render
|
131
133
|
if self.class.routing?
|
134
|
+
if self.class.router_context
|
135
|
+
`self.native.context.router = #{self.class.router_context}`
|
136
|
+
else
|
137
|
+
self.class.router_context = `self.native.context.router`
|
138
|
+
end
|
132
139
|
self.class.instance_variable_set(:@router_component, self) # this was done after mount, but I think it works here
|
133
140
|
show
|
134
141
|
elsif on_opal_server?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reactive-router
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam George
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|