@@ -61,6 +61,9 @@ gem 'reactive-ruby'
61
61
gem ' react-rails' , ' ~> 1.3.2'
62
62
gem ' opal-rails'
63
63
gem ' therubyracer' , platforms: :ruby # Required for prerendering
64
+ # for JRuby you need the below line instead
65
+ # gem 'therubyrhino, platforms: :jruby
66
+
64
67
```
65
68
66
69
Run ` bundle install ` and restart your rails server.
@@ -136,7 +139,7 @@ props), to render the component:
136
139
class HomeController < ApplicationController
137
140
def show
138
141
# render_component uses the controller name to find the 'show' component.
139
- render_component say_hello_to: params[:say_hello_to ]
142
+ render_component say_hello_to: params[:say_hello_to ]
140
143
end
141
144
end
142
145
```
@@ -161,11 +164,11 @@ regardless of the name of the controller method.
161
164
162
165
Searching for components works like this: Given a controller named
163
166
"Foo" then react.rb will search for a module named ` Foo ` containing the component.
164
- If this fails all modules will be searched (i.e. the name of the controller will be
167
+ If this fails all modules will be searched (i.e. the name of the controller will be
165
168
ignored.) In either case the search begins at the outer most scope until a match is made.
166
169
167
170
Thus for example given a controller named ` Foo ` , components could be found in the ` Foo ` module,
168
- the ` Components::Foo ` module, in the outer most scope, or in any nested module.
171
+ the ` Components::Foo ` module, in the outer most scope, or in any nested module.
169
172
The way the search works allows for small projects that do not need a lot
170
173
of name spacing, and also allows components to be shared across several controllers.
171
174
0 commit comments