{"action":"created","comment":{"url":"https://api.github.com/repos/reactjs/react-rails/pulls/comments/26528685","id":26528685,"diff_hunk":"@@ -65,7 +65,7 @@ class Railtie < ::Rails::Railtie\n       config.after_initialize do |app|\n         # Server Rendering\n         # Concat component_filenames together for server rendering\n-        app.config.react.components_js = lambda {\n+        app.config.react.components_js ||= lambda {","path":"lib/react/rails/railtie.rb","position":5,"original_position":5,"commit_id":"729abb506c8dcd8764a8c3c98ae7fa4c1371f2aa","original_commit_id":"729abb506c8dcd8764a8c3c98ae7fa4c1371f2aa","user":{"login":"vipulnsward","id":567626,"avatar_url":"https://avatars.githubusercontent.com/u/567626?v=3","gravatar_id":"","url":"https://api.github.com/users/vipulnsward","html_url":"https://github.com/vipulnsward","followers_url":"https://api.github.com/users/vipulnsward/followers","following_url":"https://api.github.com/users/vipulnsward/following{/other_user}","gists_url":"https://api.github.com/users/vipulnsward/gists{/gist_id}","starred_url":"https://api.github.com/users/vipulnsward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vipulnsward/subscriptions","organizations_url":"https://api.github.com/users/vipulnsward/orgs","repos_url":"https://api.github.com/users/vipulnsward/repos","events_url":"https://api.github.com/users/vipulnsward/events{/privacy}","received_events_url":"https://api.github.com/users/vipulnsward/received_events","type":"User","site_admin":false},"body":"@rearadmiral  `x ||= 10`, expands to `x = x || 10` . This is not guarded, and all three expressions in the latter are sequential, so x is not always guaranteed to be 10 here by ruby.\r\nAn `if`, wouldn't be affected by this. You could simple do \r\n```\r\nif app.config.react.components_js.nil?\r\n  app.config.react.components_js = ...\r\n  ...\r\nend\r\n```","created_at":"2015-03-16T21:19:11Z","updated_at":"2015-03-16T21:19:11Z","html_url":"https://github.com/reactjs/react-rails/pull/213#discussion_r26528685","pull_request_url":"https://api.github.com/repos/reactjs/react-rails/pulls/213","_links":{"self":{"href":"https://api.github.com/repos/reactjs/react-rails/pulls/comments/26528685"},"html":{"href":"https://github.com/reactjs/react-rails/pull/213#discussion_r26528685"},"pull_request":{"href":"https://api.github.com/repos/reactjs/react-rails/pulls/213"}}},"pull_request":{"url":"https://api.github.com/repos/reactjs/react-rails/pulls/213","id":31281123,"html_url":"https://github.com/reactjs/react-rails/pull/213","diff_url":"https://github.com/reactjs/react-rails/pull/213.diff","patch_url":"https://github.com/reactjs/react-rails/pull/213.patch","issue_url":"https://api.github.com/repos/reactjs/react-rails/issues/213","number":213,"state":"open","locked":false,"title":"Fix for Issue #212 components.js generated by assets:precompile","user":{"login":"rearadmiral","id":355438,"avatar_url":"https://avatars.githubusercontent.com/u/355438?v=3","gravatar_id":"","url":"https://api.github.com/users/rearadmiral","html_url":"https://github.com/rearadmiral","followers_url":"https://api.github.com/users/rearadmiral/followers","following_url":"https://api.github.com/users/rearadmiral/following{/other_user}","gists_url":"https://api.github.com/users/rearadmiral/gists{/gist_id}","starred_url":"https://api.github.com/users/rearadmiral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rearadmiral/subscriptions","organizations_url":"https://api.github.com/users/rearadmiral/orgs","repos_url":"https://api.github.com/users/rearadmiral/repos","events_url":"https://api.github.com/users/rearadmiral/events{/privacy}","received_events_url":"https://api.github.com/users/rearadmiral/received_events","type":"User","site_admin":false},"body":"is not used.\r\n\r\n- allow user to override the components_js lamdba","created_at":"2015-03-16T20:27:29Z","updated_at":"2015-03-16T21:19:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd4c210d9fcae93cbdf140e50f76d040be7fda0b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/reactjs/react-rails/pulls/213/commits","review_comments_url":"https://api.github.com/repos/reactjs/react-rails/pulls/213/comments","review_comment_url":"https://api.github.com/repos/reactjs/react-rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reactjs/react-rails/issues/213/comments","statuses_url":"https://api.github.com/repos/reactjs/react-rails/statuses/729abb506c8dcd8764a8c3c98ae7fa4c1371f2aa","head":{"label":"rearadmiral:fix-for-precompiled-assets","ref":"fix-for-precompiled-assets","sha":"729abb506c8dcd8764a8c3c98ae7fa4c1371f2aa","user":{"login":"rearadmiral","id":355438,"avatar_url":"https://avatars.githubusercontent.com/u/355438?v=3","gravatar_id":"","url":"https://api.github.com/users/rearadmiral","html_url":"https://github.com/rearadmiral","followers_url":"https://api.github.com/users/rearadmiral/followers","following_url":"https://api.github.com/users/rearadmiral/following{/other_user}","gists_url":"https://api.github.com/users/rearadmiral/gists{/gist_id}","starred_url":"https://api.github.com/users/rearadmiral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rearadmiral/subscriptions","organizations_url":"https://api.github.com/users/rearadmiral/orgs","repos_url":"https://api.github.com/users/rearadmiral/repos","events_url":"https://api.github.com/users/rearadmiral/events{/privacy}","received_events_url":"https://api.github.com/users/rearadmiral/received_events","type":"User","site_admin":false},"repo":{"id":32191788,"name":"react-rails","full_name":"rearadmiral/react-rails","owner":{"login":"rearadmiral","id":355438,"avatar_url":"https://avatars.githubusercontent.com/u/355438?v=3","gravatar_id":"","url":"https://api.github.com/users/rearadmiral","html_url":"https://github.com/rearadmiral","followers_url":"https://api.github.com/users/rearadmiral/followers","following_url":"https://api.github.com/users/rearadmiral/following{/other_user}","gists_url":"https://api.github.com/users/rearadmiral/gists{/gist_id}","starred_url":"https://api.github.com/users/rearadmiral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rearadmiral/subscriptions","organizations_url":"https://api.github.com/users/rearadmiral/orgs","repos_url":"https://api.github.com/users/rearadmiral/repos","events_url":"https://api.github.com/users/rearadmiral/events{/privacy}","received_events_url":"https://api.github.com/users/rearadmiral/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rearadmiral/react-rails","description":"Ruby gem for automatically transforming JSX and using React in Rails.","fork":true,"url":"https://api.github.com/repos/rearadmiral/react-rails","forks_url":"https://api.github.com/repos/rearadmiral/react-rails/forks","keys_url":"https://api.github.com/repos/rearadmiral/react-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rearadmiral/react-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rearadmiral/react-rails/teams","hooks_url":"https://api.github.com/repos/rearadmiral/react-rails/hooks","issue_events_url":"https://api.github.com/repos/rearadmiral/react-rails/issues/events{/number}","events_url":"https://api.github.com/repos/rearadmiral/react-rails/events","assignees_url":"https://api.github.com/repos/rearadmiral/react-rails/assignees{/user}","branches_url":"https://api.github.com/repos/rearadmiral/react-rails/branches{/branch}","tags_url":"https://api.github.com/repos/rearadmiral/react-rails/tags","blobs_url":"https://api.github.com/repos/rearadmiral/react-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rearadmiral/react-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rearadmiral/react-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rearadmiral/react-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rearadmiral/react-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rearadmiral/react-rails/languages","stargazers_url":"https://api.github.com/repos/rearadmiral/react-rails/stargazers","contributors_url":"https://api.github.com/repos/rearadmiral/react-rails/contributors","subscribers_url":"https://api.github.com/repos/rearadmiral/react-rails/subscribers","subscription_url":"https://api.github.com/repos/rearadmiral/react-rails/subscription","commits_url":"https://api.github.com/repos/rearadmiral/react-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rearadmiral/react-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rearadmiral/react-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rearadmiral/react-rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/rearadmiral/react-rails/contents/{+path}","compare_url":"https://api.github.com/repos/rearadmiral/react-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rearadmiral/react-rails/merges","archive_url":"https://api.github.com/repos/rearadmiral/react-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rearadmiral/react-rails/downloads","issues_url":"https://api.github.com/repos/rearadmiral/react-rails/issues{/number}","pulls_url":"https://api.github.com/repos/rearadmiral/react-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rearadmiral/react-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rearadmiral/react-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rearadmiral/react-rails/labels{/name}","releases_url":"https://api.github.com/repos/rearadmiral/react-rails/releases{/id}","created_at":"2015-03-14T02:10:42Z","updated_at":"2015-03-14T02:10:43Z","pushed_at":"2015-03-16T20:24:50Z","git_url":"git://github.com/rearadmiral/react-rails.git","ssh_url":"git@github.com:rearadmiral/react-rails.git","clone_url":"https://github.com/rearadmiral/react-rails.git","svn_url":"https://github.com/rearadmiral/react-rails","homepage":null,"size":277,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"reactjs:master","ref":"master","sha":"b6538ae1b11f7da82a7186929cedc0dcbba10ae3","user":{"login":"reactjs","id":6412038,"avatar_url":"https://avatars.githubusercontent.com/u/6412038?v=3","gravatar_id":"","url":"https://api.github.com/users/reactjs","html_url":"https://github.com/reactjs","followers_url":"https://api.github.com/users/reactjs/followers","following_url":"https://api.github.com/users/reactjs/following{/other_user}","gists_url":"https://api.github.com/users/reactjs/gists{/gist_id}","starred_url":"https://api.github.com/users/reactjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactjs/subscriptions","organizations_url":"https://api.github.com/users/reactjs/orgs","repos_url":"https://api.github.com/users/reactjs/repos","events_url":"https://api.github.com/users/reactjs/events{/privacy}","received_events_url":"https://api.github.com/users/reactjs/received_events","type":"Organization","site_admin":false},"repo":{"id":11667865,"name":"react-rails","full_name":"reactjs/react-rails","owner":{"login":"reactjs","id":6412038,"avatar_url":"https://avatars.githubusercontent.com/u/6412038?v=3","gravatar_id":"","url":"https://api.github.com/users/reactjs","html_url":"https://github.com/reactjs","followers_url":"https://api.github.com/users/reactjs/followers","following_url":"https://api.github.com/users/reactjs/following{/other_user}","gists_url":"https://api.github.com/users/reactjs/gists{/gist_id}","starred_url":"https://api.github.com/users/reactjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactjs/subscriptions","organizations_url":"https://api.github.com/users/reactjs/orgs","repos_url":"https://api.github.com/users/reactjs/repos","events_url":"https://api.github.com/users/reactjs/events{/privacy}","received_events_url":"https://api.github.com/users/reactjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reactjs/react-rails","description":"Ruby gem for automatically transforming JSX and using React in Rails.","fork":false,"url":"https://api.github.com/repos/reactjs/react-rails","forks_url":"https://api.github.com/repos/reactjs/react-rails/forks","keys_url":"https://api.github.com/repos/reactjs/react-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reactjs/react-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reactjs/react-rails/teams","hooks_url":"https://api.github.com/repos/reactjs/react-rails/hooks","issue_events_url":"https://api.github.com/repos/reactjs/react-rails/issues/events{/number}","events_url":"https://api.github.com/repos/reactjs/react-rails/events","assignees_url":"https://api.github.com/repos/reactjs/react-rails/assignees{/user}","branches_url":"https://api.github.com/repos/reactjs/react-rails/branches{/branch}","tags_url":"https://api.github.com/repos/reactjs/react-rails/tags","blobs_url":"https://api.github.com/repos/reactjs/react-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reactjs/react-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reactjs/react-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/reactjs/react-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reactjs/react-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/reactjs/react-rails/languages","stargazers_url":"https://api.github.com/repos/reactjs/react-rails/stargazers","contributors_url":"https://api.github.com/repos/reactjs/react-rails/contributors","subscribers_url":"https://api.github.com/repos/reactjs/react-rails/subscribers","subscription_url":"https://api.github.com/repos/reactjs/react-rails/subscription","commits_url":"https://api.github.com/repos/reactjs/react-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/reactjs/react-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/reactjs/react-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/reactjs/react-rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/reactjs/react-rails/contents/{+path}","compare_url":"https://api.github.com/repos/reactjs/react-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reactjs/react-rails/merges","archive_url":"https://api.github.com/repos/reactjs/react-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reactjs/react-rails/downloads","issues_url":"https://api.github.com/repos/reactjs/react-rails/issues{/number}","pulls_url":"https://api.github.com/repos/reactjs/react-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/reactjs/react-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/reactjs/react-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reactjs/react-rails/labels{/name}","releases_url":"https://api.github.com/repos/reactjs/react-rails/releases{/id}","created_at":"2013-07-25T18:27:18Z","updated_at":"2015-03-16T20:00:27Z","pushed_at":"2015-03-14T19:13:05Z","git_url":"git://github.com/reactjs/react-rails.git","ssh_url":"git@github.com:reactjs/react-rails.git","clone_url":"https://github.com/reactjs/react-rails.git","svn_url":"https://github.com/reactjs/react-rails","homepage":null,"size":1646,"stargazers_count":928,"watchers_count":928,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":149,"mirror_url":null,"open_issues_count":49,"forks":149,"open_issues":49,"watchers":928,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reactjs/react-rails/pulls/213"},"html":{"href":"https://github.com/reactjs/react-rails/pull/213"},"issue":{"href":"https://api.github.com/repos/reactjs/react-rails/issues/213"},"comments":{"href":"https://api.github.com/repos/reactjs/react-rails/issues/213/comments"},"review_comments":{"href":"https://api.github.com/repos/reactjs/react-rails/pulls/213/comments"},"review_comment":{"href":"https://api.github.com/repos/reactjs/react-rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reactjs/react-rails/pulls/213/commits"},"statuses":{"href":"https://api.github.com/repos/reactjs/react-rails/statuses/729abb506c8dcd8764a8c3c98ae7fa4c1371f2aa"}}}}