@@ -61,6 +61,9 @@ gem 'reactive-ruby'
6161gem ' react-rails' , ' ~> 1.3.2'
6262gem ' opal-rails'
6363gem ' therubyracer' , platforms: :ruby # Required for prerendering
64+ # for JRuby you need the below line instead
65+ # gem 'therubyrhino, platforms: :jruby
66+
6467```
6568
6669Run ` bundle install ` and restart your rails server.
@@ -136,7 +139,7 @@ props), to render the component:
136139class HomeController < ApplicationController
137140 def show
138141 # 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 ]
140143 end
141144end
142145```
@@ -161,11 +164,11 @@ regardless of the name of the controller method.
161164
162165Searching for components works like this: Given a controller named
163166"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
165168ignored.) In either case the search begins at the outer most scope until a match is made.
166169
167170Thus 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.
169172The way the search works allows for small projects that do not need a lot
170173of name spacing, and also allows components to be shared across several controllers.
171174
0 commit comments