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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3dcdd11e337d8988b6bdd8a53a0574edb3112a6
4
- data.tar.gz: 66d093331294658c98740d6993805646781e0149
3
+ metadata.gz: ccd41e19e04f5caf27a0789a81a15217356f8dee
4
+ data.tar.gz: 23ffa894223c089f7d690e492e140c324f25baa7
5
5
  SHA512:
6
- metadata.gz: abcef3451bacffb2a4e6eb352e3e96aadf956f5ad6c182b818fa4ab2c7adcf72a61678103bb6488f7793cc17a2ba72d3e4caf71e992ad60777ac45558bc77e4a
7
- data.tar.gz: a415c2a9088e7f8054938831a27f06cc8685881fd0116d80f088dde560f3a5ba4e71c68c984ecb83619e4363c872c7526e438a3be560253038b8a85df390b5d6
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
@@ -1,3 +1,3 @@
1
1
  module ReactiveRouter
2
- VERSION = "0.7.6"
2
+ VERSION = "0.7.7"
3
3
  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.6
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-17 00:00:00.000000000 Z
11
+ date: 2015-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler