{"action":"created","comment":{"url":"https://api.github.com/repos/shakacode/react_on_rails/pulls/comments/44371658","id":44371658,"diff_hunk":"@@ -90,8 +129,26 @@ Place your JavaScript code inside of the provided `client/app` folder. Use modul\n   global.HelloWorld = HelloWorldAppServer;\n   ```\n    \n+### Rails View Helpers In-Depth\n+Once the bundled files have been generated in your `app/assets/javascripts/generated` folder and you have exposed your components globally, you will want to run your code in your Rails views using the included helper method.\n+\n+This is how you actually render the React components you exposed to `window` inside of `clientGlobals` (and `global` inside of `serverGlobals` if you are server rendering).\n+\n+`react_component(component_name, props = {}, options = {})`\n++ **react_component_name:** Can be a React component, created using a ES6 class, or `React.createClass`, or a generator function that returns a React component.\n++ **props:** Ruby Hash which contains the properties to pass to the react object\n++ **options:**\n+  + **generator_function:** default is false, set to true if you want to use a generator function rather than a React Component.\n+  + **prerender:** enable server-side rendering of component. Set to false when debugging!\n+  + **trace:** set to true to print additional debugging information in the browser. Defaults to true for development, off otherwise.\n+  + **replay_console:** Default is true. False will disable echoing server-rendering logs to the browser. While this can make troubleshooting server rendering difficult, so long as you have the default configuration of logging_on_server set to true, you'll still see the errors on the server.\n++ Any other options are passed to the content tag, including the id\n+\n+`def server_render_js(js_expression, options = {})`","path":"README.md","position":127,"original_position":127,"commit_id":"9c3388425926a1e64c4f12d61feae6ca94f06ab8","original_commit_id":"9c3388425926a1e64c4f12d61feae6ca94f06ab8","user":{"login":"robwise","id":6173488,"avatar_url":"https://avatars.githubusercontent.com/u/6173488?v=3","gravatar_id":"","url":"https://api.github.com/users/robwise","html_url":"https://github.com/robwise","followers_url":"https://api.github.com/users/robwise/followers","following_url":"https://api.github.com/users/robwise/following{/other_user}","gists_url":"https://api.github.com/users/robwise/gists{/gist_id}","starred_url":"https://api.github.com/users/robwise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robwise/subscriptions","organizations_url":"https://api.github.com/users/robwise/orgs","repos_url":"https://api.github.com/users/robwise/repos","events_url":"https://api.github.com/users/robwise/events{/privacy}","received_events_url":"https://api.github.com/users/robwise/received_events","type":"User","site_admin":false},"body":"@justin808 hmm, the only place that options is called is the very last line, so I think yes on **replay_console** and no on **trace**?\r\n\r\n` raw(\"#{result[0]}#{replay_console(options) ? result[1] : ''}\")`\r\n\r\nhttps://github.com/shakacode/react_on_rails/blob/master/app/helpers/react_on_rails_helper.rb#L127","created_at":"2015-11-10T05:34:32Z","updated_at":"2015-11-10T05:34:32Z","html_url":"https://github.com/shakacode/react_on_rails/pull/93#discussion_r44371658","pull_request_url":"https://api.github.com/repos/shakacode/react_on_rails/pulls/93","_links":{"self":{"href":"https://api.github.com/repos/shakacode/react_on_rails/pulls/comments/44371658"},"html":{"href":"https://github.com/shakacode/react_on_rails/pull/93#discussion_r44371658"},"pull_request":{"href":"https://api.github.com/repos/shakacode/react_on_rails/pulls/93"}}},"pull_request":{"url":"https://api.github.com/repos/shakacode/react_on_rails/pulls/93","id":50054411,"html_url":"https://github.com/shakacode/react_on_rails/pull/93","diff_url":"https://github.com/shakacode/react_on_rails/pull/93.diff","patch_url":"https://github.com/shakacode/react_on_rails/pull/93.patch","issue_url":"https://api.github.com/repos/shakacode/react_on_rails/issues/93","number":93,"state":"open","locked":false,"title":"Improve README and link to the v1.0.0 generator results repo","user":{"login":"robwise","id":6173488,"avatar_url":"https://avatars.githubusercontent.com/u/6173488?v=3","gravatar_id":"","url":"https://api.github.com/users/robwise","html_url":"https://github.com/robwise","followers_url":"https://api.github.com/users/robwise/followers","following_url":"https://api.github.com/users/robwise/following{/other_user}","gists_url":"https://api.github.com/users/robwise/gists{/gist_id}","starred_url":"https://api.github.com/users/robwise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robwise/subscriptions","organizations_url":"https://api.github.com/users/robwise/orgs","repos_url":"https://api.github.com/users/robwise/repos","events_url":"https://api.github.com/users/robwise/events{/privacy}","received_events_url":"https://api.github.com/users/robwise/received_events","type":"User","site_admin":false},"body":"I added a table of contents and rearranged some things, as well as expanded the basic section at the beginning explaining how to use the helpers. It's still a heck of a lot of text, though.","created_at":"2015-11-08T06:42:02Z","updated_at":"2015-11-10T05:34:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee262b3331197605ae6d60b53a9239b4ffb0ac5e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/shakacode/react_on_rails/pulls/93/commits","review_comments_url":"https://api.github.com/repos/shakacode/react_on_rails/pulls/93/comments","review_comment_url":"https://api.github.com/repos/shakacode/react_on_rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shakacode/react_on_rails/issues/93/comments","statuses_url":"https://api.github.com/repos/shakacode/react_on_rails/statuses/9c3388425926a1e64c4f12d61feae6ca94f06ab8","head":{"label":"shakacode:update-readme","ref":"update-readme","sha":"9c3388425926a1e64c4f12d61feae6ca94f06ab8","user":{"login":"shakacode","id":13779463,"avatar_url":"https://avatars.githubusercontent.com/u/13779463?v=3","gravatar_id":"","url":"https://api.github.com/users/shakacode","html_url":"https://github.com/shakacode","followers_url":"https://api.github.com/users/shakacode/followers","following_url":"https://api.github.com/users/shakacode/following{/other_user}","gists_url":"https://api.github.com/users/shakacode/gists{/gist_id}","starred_url":"https://api.github.com/users/shakacode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shakacode/subscriptions","organizations_url":"https://api.github.com/users/shakacode/orgs","repos_url":"https://api.github.com/users/shakacode/repos","events_url":"https://api.github.com/users/shakacode/events{/privacy}","received_events_url":"https://api.github.com/users/shakacode/received_events","type":"Organization","site_admin":false},"repo":{"id":41117523,"name":"react_on_rails","full_name":"shakacode/react_on_rails","owner":{"login":"shakacode","id":13779463,"avatar_url":"https://avatars.githubusercontent.com/u/13779463?v=3","gravatar_id":"","url":"https://api.github.com/users/shakacode","html_url":"https://github.com/shakacode","followers_url":"https://api.github.com/users/shakacode/followers","following_url":"https://api.github.com/users/shakacode/following{/other_user}","gists_url":"https://api.github.com/users/shakacode/gists{/gist_id}","starred_url":"https://api.github.com/users/shakacode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shakacode/subscriptions","organizations_url":"https://api.github.com/users/shakacode/orgs","repos_url":"https://api.github.com/users/shakacode/repos","events_url":"https://api.github.com/users/shakacode/events{/privacy}","received_events_url":"https://api.github.com/users/shakacode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shakacode/react_on_rails","description":"Integration of React + Webpack + Rails to build Universal (Isomorphic) Apps","fork":false,"url":"https://api.github.com/repos/shakacode/react_on_rails","forks_url":"https://api.github.com/repos/shakacode/react_on_rails/forks","keys_url":"https://api.github.com/repos/shakacode/react_on_rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shakacode/react_on_rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shakacode/react_on_rails/teams","hooks_url":"https://api.github.com/repos/shakacode/react_on_rails/hooks","issue_events_url":"https://api.github.com/repos/shakacode/react_on_rails/issues/events{/number}","events_url":"https://api.github.com/repos/shakacode/react_on_rails/events","assignees_url":"https://api.github.com/repos/shakacode/react_on_rails/assignees{/user}","branches_url":"https://api.github.com/repos/shakacode/react_on_rails/branches{/branch}","tags_url":"https://api.github.com/repos/shakacode/react_on_rails/tags","blobs_url":"https://api.github.com/repos/shakacode/react_on_rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shakacode/react_on_rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shakacode/react_on_rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/shakacode/react_on_rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shakacode/react_on_rails/statuses/{sha}","languages_url":"https://api.github.com/repos/shakacode/react_on_rails/languages","stargazers_url":"https://api.github.com/repos/shakacode/react_on_rails/stargazers","contributors_url":"https://api.github.com/repos/shakacode/react_on_rails/contributors","subscribers_url":"https://api.github.com/repos/shakacode/react_on_rails/subscribers","subscription_url":"https://api.github.com/repos/shakacode/react_on_rails/subscription","commits_url":"https://api.github.com/repos/shakacode/react_on_rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/shakacode/react_on_rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/shakacode/react_on_rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/shakacode/react_on_rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/shakacode/react_on_rails/contents/{+path}","compare_url":"https://api.github.com/repos/shakacode/react_on_rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shakacode/react_on_rails/merges","archive_url":"https://api.github.com/repos/shakacode/react_on_rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shakacode/react_on_rails/downloads","issues_url":"https://api.github.com/repos/shakacode/react_on_rails/issues{/number}","pulls_url":"https://api.github.com/repos/shakacode/react_on_rails/pulls{/number}","milestones_url":"https://api.github.com/repos/shakacode/react_on_rails/milestones{/number}","notifications_url":"https://api.github.com/repos/shakacode/react_on_rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shakacode/react_on_rails/labels{/name}","releases_url":"https://api.github.com/repos/shakacode/react_on_rails/releases{/id}","created_at":"2015-08-20T20:31:54Z","updated_at":"2015-11-10T04:36:53Z","pushed_at":"2015-11-10T05:25:50Z","git_url":"git://github.com/shakacode/react_on_rails.git","ssh_url":"git@github.com:shakacode/react_on_rails.git","clone_url":"https://github.com/shakacode/react_on_rails.git","svn_url":"https://github.com/shakacode/react_on_rails","homepage":null,"size":1430,"stargazers_count":195,"watchers_count":195,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":15,"forks":19,"open_issues":15,"watchers":195,"default_branch":"master"}},"base":{"label":"shakacode:master","ref":"master","sha":"9c16d9be95cc524fe2a48cb45198babef9515912","user":{"login":"shakacode","id":13779463,"avatar_url":"https://avatars.githubusercontent.com/u/13779463?v=3","gravatar_id":"","url":"https://api.github.com/users/shakacode","html_url":"https://github.com/shakacode","followers_url":"https://api.github.com/users/shakacode/followers","following_url":"https://api.github.com/users/shakacode/following{/other_user}","gists_url":"https://api.github.com/users/shakacode/gists{/gist_id}","starred_url":"https://api.github.com/users/shakacode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shakacode/subscriptions","organizations_url":"https://api.github.com/users/shakacode/orgs","repos_url":"https://api.github.com/users/shakacode/repos","events_url":"https://api.github.com/users/shakacode/events{/privacy}","received_events_url":"https://api.github.com/users/shakacode/received_events","type":"Organization","site_admin":false},"repo":{"id":41117523,"name":"react_on_rails","full_name":"shakacode/react_on_rails","owner":{"login":"shakacode","id":13779463,"avatar_url":"https://avatars.githubusercontent.com/u/13779463?v=3","gravatar_id":"","url":"https://api.github.com/users/shakacode","html_url":"https://github.com/shakacode","followers_url":"https://api.github.com/users/shakacode/followers","following_url":"https://api.github.com/users/shakacode/following{/other_user}","gists_url":"https://api.github.com/users/shakacode/gists{/gist_id}","starred_url":"https://api.github.com/users/shakacode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shakacode/subscriptions","organizations_url":"https://api.github.com/users/shakacode/orgs","repos_url":"https://api.github.com/users/shakacode/repos","events_url":"https://api.github.com/users/shakacode/events{/privacy}","received_events_url":"https://api.github.com/users/shakacode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shakacode/react_on_rails","description":"Integration of React + Webpack + Rails to build Universal (Isomorphic) Apps","fork":false,"url":"https://api.github.com/repos/shakacode/react_on_rails","forks_url":"https://api.github.com/repos/shakacode/react_on_rails/forks","keys_url":"https://api.github.com/repos/shakacode/react_on_rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shakacode/react_on_rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shakacode/react_on_rails/teams","hooks_url":"https://api.github.com/repos/shakacode/react_on_rails/hooks","issue_events_url":"https://api.github.com/repos/shakacode/react_on_rails/issues/events{/number}","events_url":"https://api.github.com/repos/shakacode/react_on_rails/events","assignees_url":"https://api.github.com/repos/shakacode/react_on_rails/assignees{/user}","branches_url":"https://api.github.com/repos/shakacode/react_on_rails/branches{/branch}","tags_url":"https://api.github.com/repos/shakacode/react_on_rails/tags","blobs_url":"https://api.github.com/repos/shakacode/react_on_rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shakacode/react_on_rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shakacode/react_on_rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/shakacode/react_on_rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shakacode/react_on_rails/statuses/{sha}","languages_url":"https://api.github.com/repos/shakacode/react_on_rails/languages","stargazers_url":"https://api.github.com/repos/shakacode/react_on_rails/stargazers","contributors_url":"https://api.github.com/repos/shakacode/react_on_rails/contributors","subscribers_url":"https://api.github.com/repos/shakacode/react_on_rails/subscribers","subscription_url":"https://api.github.com/repos/shakacode/react_on_rails/subscription","commits_url":"https://api.github.com/repos/shakacode/react_on_rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/shakacode/react_on_rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/shakacode/react_on_rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/shakacode/react_on_rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/shakacode/react_on_rails/contents/{+path}","compare_url":"https://api.github.com/repos/shakacode/react_on_rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shakacode/react_on_rails/merges","archive_url":"https://api.github.com/repos/shakacode/react_on_rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shakacode/react_on_rails/downloads","issues_url":"https://api.github.com/repos/shakacode/react_on_rails/issues{/number}","pulls_url":"https://api.github.com/repos/shakacode/react_on_rails/pulls{/number}","milestones_url":"https://api.github.com/repos/shakacode/react_on_rails/milestones{/number}","notifications_url":"https://api.github.com/repos/shakacode/react_on_rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shakacode/react_on_rails/labels{/name}","releases_url":"https://api.github.com/repos/shakacode/react_on_rails/releases{/id}","created_at":"2015-08-20T20:31:54Z","updated_at":"2015-11-10T04:36:53Z","pushed_at":"2015-11-10T05:25:50Z","git_url":"git://github.com/shakacode/react_on_rails.git","ssh_url":"git@github.com:shakacode/react_on_rails.git","clone_url":"https://github.com/shakacode/react_on_rails.git","svn_url":"https://github.com/shakacode/react_on_rails","homepage":null,"size":1430,"stargazers_count":195,"watchers_count":195,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":15,"forks":19,"open_issues":15,"watchers":195,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shakacode/react_on_rails/pulls/93"},"html":{"href":"https://github.com/shakacode/react_on_rails/pull/93"},"issue":{"href":"https://api.github.com/repos/shakacode/react_on_rails/issues/93"},"comments":{"href":"https://api.github.com/repos/shakacode/react_on_rails/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/shakacode/react_on_rails/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/shakacode/react_on_rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shakacode/react_on_rails/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/shakacode/react_on_rails/statuses/9c3388425926a1e64c4f12d61feae6ca94f06ab8"}}}}