react-rails 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/assets/javascripts/react_ujs.js.erb +3 -1
- data/lib/react/rails/version.rb +1 -1
- data/lib/react/rails/view_helper.rb +8 -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: 3b0add932e37ac43fea18b43d735f629beddd7fa
|
4
|
+
data.tar.gz: 23b384f84760fd7c3e6acaa544f8bba42225c681
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f4838f09a9be35626d8e9dc0b3b0dda3154946a4734197f364f17c6ca2ab614030197360565cf735f6e7e150eeed37fa257237fcd4a98413d5529395c1695dc
|
7
|
+
data.tar.gz: a5df10dca7daa874f0afef8426e7f947d633b4ae248d684e2663ae33034142c6462b24600e7b84c9657625232c0b051d0f130d65308f35be94bb6a0e515a829d
|
@@ -66,7 +66,9 @@
|
|
66
66
|
for (var i = 0; i < nodes.length; ++i) {
|
67
67
|
var node = nodes[i];
|
68
68
|
|
69
|
-
|
69
|
+
// Prefer ReactDOM if defined (introduced in 0.14)
|
70
|
+
var renderer = (typeof ReactDOM == "object") ? ReactDOM : React;
|
71
|
+
renderer.unmountComponentAtNode(node);
|
70
72
|
}
|
71
73
|
}
|
72
74
|
};
|
data/lib/react/rails/version.rb
CHANGED
@@ -9,8 +9,15 @@ module React
|
|
9
9
|
# The default is {React::Rails::ComponentMount}
|
10
10
|
mattr_accessor :helper_implementation_class
|
11
11
|
|
12
|
+
# Render a React component into the view
|
13
|
+
# using the {helper_implementation_class}
|
14
|
+
#
|
15
|
+
# If called during a Rails controller-managed request, use the instance
|
16
|
+
# created by the controller.
|
17
|
+
#
|
18
|
+
# Otherwise, make a new instance.
|
12
19
|
def react_component(*args, &block)
|
13
|
-
helper_obj = @__react_component_helper
|
20
|
+
helper_obj = @__react_component_helper ||= helper_implementation_class.new
|
14
21
|
helper_obj.react_component(*args, &block)
|
15
22
|
end
|
16
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: react-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul O’Shannessy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appraisal
|