reactjs/react-rails — pull request #118 by garbles (2014-11-20 03:37:57+00:00)
Title: Create render_react_component controller helper

`render_react_component` allows you to render a React component in place of a typical rails template from `app/views`.

Instead of creating a view that only renders a component, _e.g._
```erb
<%= react_component "TodoList", {:todos => @todos}, :prerender => true %>
```
You can create call the helper from the controller action, _e.g._
```ruby
class TodosController < ApplicationController
def show
@todos = %w{todo1 todo2 todo3}
render_react_component "TodoList", {:todos => @todos}, :prerender => true
end
end
```