reactive-router 0.7.6 → 0.7.7
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 +8 -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: ccd41e19e04f5caf27a0789a81a15217356f8dee
|
4
|
+
data.tar.gz: 23ffa894223c089f7d690e492e140c324f25baa7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbc7f6a515e5a126039ae183a9fe559c132a4d048987f345b27a046ccb1498389d0772cc55baf6347c8cd7b3fd49af32dbcef9fa7c4689cd740b23469f76d475
|
7
|
+
data.tar.gz: daeade2ed07dede1f019d9d3706a923d587dffee42d691ee8cd8d2a4644c3280c5bdb11d9a5ecb49ae711c11b0fa28d956125071b99d677d68d526247a4a610c
|
@@ -37,6 +37,14 @@ module React
|
|
37
37
|
`#{@router_component}.native.transitionTo.apply(self.native, #{[route_or_path, params.to_n, query.to_n]})`
|
38
38
|
end
|
39
39
|
|
40
|
+
def link(opts={}, &block)
|
41
|
+
params = opts.delete(:params) || {}
|
42
|
+
query = opts.delete(:query) || {}
|
43
|
+
to = opts.delete(:to)
|
44
|
+
React::RenderingContext.render("a", opts, &block).on(:click) { transition_to(to, params, query) }
|
45
|
+
#React.create_element("a", opts, &block).on(:click) { transition_to(to, params, query) }
|
46
|
+
end
|
47
|
+
|
40
48
|
def url_param_evaluators
|
41
49
|
@url_param_evaluators ||= []
|
42
50
|
end
|
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.7
|
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-09-
|
11
|
+
date: 2015-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|