{"action":"opened","number":421,"pull_request":{"url":"https://api.github.com/repos/railsbridge/bridge_troll/pulls/421","id":54477391,"html_url":"https://github.com/railsbridge/bridge_troll/pull/421","diff_url":"https://github.com/railsbridge/bridge_troll/pull/421.diff","patch_url":"https://github.com/railsbridge/bridge_troll/pull/421.patch","issue_url":"https://api.github.com/repos/railsbridge/bridge_troll/issues/421","number":421,"state":"open","locked":false,"title":"Create a new Location from the events/new view via AJAX","user":{"login":"StevenXL","id":7391433,"avatar_url":"https://avatars.githubusercontent.com/u/7391433?v=3","gravatar_id":"","url":"https://api.github.com/users/StevenXL","html_url":"https://github.com/StevenXL","followers_url":"https://api.github.com/users/StevenXL/followers","following_url":"https://api.github.com/users/StevenXL/following{/other_user}","gists_url":"https://api.github.com/users/StevenXL/gists{/gist_id}","starred_url":"https://api.github.com/users/StevenXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StevenXL/subscriptions","organizations_url":"https://api.github.com/users/StevenXL/orgs","repos_url":"https://api.github.com/users/StevenXL/repos","events_url":"https://api.github.com/users/StevenXL/events{/privacy}","received_events_url":"https://api.github.com/users/StevenXL/received_events","type":"User","site_admin":false},"body":"Create a new location via a modal on the events/new view via AJAX,\r\neliminating the need for a page refresh.\r\n\r\nThis was done by using unobtrusive javascript, a bootstrap modal, and\r\ncode to that adds the ability of the location controller to respond to\r\njavascript requests. The major changes are as follows:\r\n\r\n1. The Events controller now sets an empty location for the new and\r\ncreate action. This is necessary to properly render the location form.\r\n\r\n2. The location controller now responds to both HTML and JS requests.\r\n\r\n3. A location modal, which renders a new location form partial, has been\r\nadded to the `events/_form partial` if `@event.new_record?`.\r\n\r\n4. A location modal partial has been created within the `views/events`\r\nfolder.  This modal invokes the `locations/_form` partial. By splitting\r\nout the modal, we are able to only include it if `@event.new_record?` is\r\ntrue.\r\n\r\n5. The `locations_/form` partial now has its remote option set to true if\r\nit is being rendered from `events/_form`.\r\n\r\n6. Two new files, `create.js.erb` and `create_failed.js.erb` have been so\r\nthat the Location controller can respond with Javascript if the `#create`\r\naction receives a javascript request.\r\n\r\n7. A full test-suit for this feature is included.","created_at":"2015-12-23T15:06:46Z","updated_at":"2015-12-23T15:06:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/railsbridge/bridge_troll/pulls/421/commits","review_comments_url":"https://api.github.com/repos/railsbridge/bridge_troll/pulls/421/comments","review_comment_url":"https://api.github.com/repos/railsbridge/bridge_troll/pulls/comments{/number}","comments_url":"https://api.github.com/repos/railsbridge/bridge_troll/issues/421/comments","statuses_url":"https://api.github.com/repos/railsbridge/bridge_troll/statuses/76bcf859fc76abd107b9bdfedb853e88c436234b","head":{"label":"StevenXL:sl-ajaxify-location","ref":"sl-ajaxify-location","sha":"76bcf859fc76abd107b9bdfedb853e88c436234b","user":{"login":"StevenXL","id":7391433,"avatar_url":"https://avatars.githubusercontent.com/u/7391433?v=3","gravatar_id":"","url":"https://api.github.com/users/StevenXL","html_url":"https://github.com/StevenXL","followers_url":"https://api.github.com/users/StevenXL/followers","following_url":"https://api.github.com/users/StevenXL/following{/other_user}","gists_url":"https://api.github.com/users/StevenXL/gists{/gist_id}","starred_url":"https://api.github.com/users/StevenXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StevenXL/subscriptions","organizations_url":"https://api.github.com/users/StevenXL/orgs","repos_url":"https://api.github.com/users/StevenXL/repos","events_url":"https://api.github.com/users/StevenXL/events{/privacy}","received_events_url":"https://api.github.com/users/StevenXL/received_events","type":"User","site_admin":false},"repo":{"id":47343538,"name":"bridge_troll","full_name":"StevenXL/bridge_troll","owner":{"login":"StevenXL","id":7391433,"avatar_url":"https://avatars.githubusercontent.com/u/7391433?v=3","gravatar_id":"","url":"https://api.github.com/users/StevenXL","html_url":"https://github.com/StevenXL","followers_url":"https://api.github.com/users/StevenXL/followers","following_url":"https://api.github.com/users/StevenXL/following{/other_user}","gists_url":"https://api.github.com/users/StevenXL/gists{/gist_id}","starred_url":"https://api.github.com/users/StevenXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StevenXL/subscriptions","organizations_url":"https://api.github.com/users/StevenXL/orgs","repos_url":"https://api.github.com/users/StevenXL/repos","events_url":"https://api.github.com/users/StevenXL/events{/privacy}","received_events_url":"https://api.github.com/users/StevenXL/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/StevenXL/bridge_troll","description":"Event management system for all the Bridges (RailsBridge, MobileBridge, GoBridge, etc!)","fork":true,"url":"https://api.github.com/repos/StevenXL/bridge_troll","forks_url":"https://api.github.com/repos/StevenXL/bridge_troll/forks","keys_url":"https://api.github.com/repos/StevenXL/bridge_troll/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StevenXL/bridge_troll/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StevenXL/bridge_troll/teams","hooks_url":"https://api.github.com/repos/StevenXL/bridge_troll/hooks","issue_events_url":"https://api.github.com/repos/StevenXL/bridge_troll/issues/events{/number}","events_url":"https://api.github.com/repos/StevenXL/bridge_troll/events","assignees_url":"https://api.github.com/repos/StevenXL/bridge_troll/assignees{/user}","branches_url":"https://api.github.com/repos/StevenXL/bridge_troll/branches{/branch}","tags_url":"https://api.github.com/repos/StevenXL/bridge_troll/tags","blobs_url":"https://api.github.com/repos/StevenXL/bridge_troll/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StevenXL/bridge_troll/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StevenXL/bridge_troll/git/refs{/sha}","trees_url":"https://api.github.com/repos/StevenXL/bridge_troll/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StevenXL/bridge_troll/statuses/{sha}","languages_url":"https://api.github.com/repos/StevenXL/bridge_troll/languages","stargazers_url":"https://api.github.com/repos/StevenXL/bridge_troll/stargazers","contributors_url":"https://api.github.com/repos/StevenXL/bridge_troll/contributors","subscribers_url":"https://api.github.com/repos/StevenXL/bridge_troll/subscribers","subscription_url":"https://api.github.com/repos/StevenXL/bridge_troll/subscription","commits_url":"https://api.github.com/repos/StevenXL/bridge_troll/commits{/sha}","git_commits_url":"https://api.github.com/repos/StevenXL/bridge_troll/git/commits{/sha}","comments_url":"https://api.github.com/repos/StevenXL/bridge_troll/comments{/number}","issue_comment_url":"https://api.github.com/repos/StevenXL/bridge_troll/issues/comments{/number}","contents_url":"https://api.github.com/repos/StevenXL/bridge_troll/contents/{+path}","compare_url":"https://api.github.com/repos/StevenXL/bridge_troll/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StevenXL/bridge_troll/merges","archive_url":"https://api.github.com/repos/StevenXL/bridge_troll/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StevenXL/bridge_troll/downloads","issues_url":"https://api.github.com/repos/StevenXL/bridge_troll/issues{/number}","pulls_url":"https://api.github.com/repos/StevenXL/bridge_troll/pulls{/number}","milestones_url":"https://api.github.com/repos/StevenXL/bridge_troll/milestones{/number}","notifications_url":"https://api.github.com/repos/StevenXL/bridge_troll/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StevenXL/bridge_troll/labels{/name}","releases_url":"https://api.github.com/repos/StevenXL/bridge_troll/releases{/id}","created_at":"2015-12-03T16:10:44Z","updated_at":"2015-12-03T16:10:46Z","pushed_at":"2015-12-23T15:04:10Z","git_url":"git://github.com/StevenXL/bridge_troll.git","ssh_url":"git@github.com:StevenXL/bridge_troll.git","clone_url":"https://github.com/StevenXL/bridge_troll.git","svn_url":"https://github.com/StevenXL/bridge_troll","homepage":"http://www.bridgetroll.org","size":4889,"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":"railsbridge:master","ref":"master","sha":"906f0ef34feba3d4ac72825fcbc3c913f91657b1","user":{"login":"railsbridge","id":81319,"avatar_url":"https://avatars.githubusercontent.com/u/81319?v=3","gravatar_id":"","url":"https://api.github.com/users/railsbridge","html_url":"https://github.com/railsbridge","followers_url":"https://api.github.com/users/railsbridge/followers","following_url":"https://api.github.com/users/railsbridge/following{/other_user}","gists_url":"https://api.github.com/users/railsbridge/gists{/gist_id}","starred_url":"https://api.github.com/users/railsbridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/railsbridge/subscriptions","organizations_url":"https://api.github.com/users/railsbridge/orgs","repos_url":"https://api.github.com/users/railsbridge/repos","events_url":"https://api.github.com/users/railsbridge/events{/privacy}","received_events_url":"https://api.github.com/users/railsbridge/received_events","type":"Organization","site_admin":false},"repo":{"id":1519818,"name":"bridge_troll","full_name":"railsbridge/bridge_troll","owner":{"login":"railsbridge","id":81319,"avatar_url":"https://avatars.githubusercontent.com/u/81319?v=3","gravatar_id":"","url":"https://api.github.com/users/railsbridge","html_url":"https://github.com/railsbridge","followers_url":"https://api.github.com/users/railsbridge/followers","following_url":"https://api.github.com/users/railsbridge/following{/other_user}","gists_url":"https://api.github.com/users/railsbridge/gists{/gist_id}","starred_url":"https://api.github.com/users/railsbridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/railsbridge/subscriptions","organizations_url":"https://api.github.com/users/railsbridge/orgs","repos_url":"https://api.github.com/users/railsbridge/repos","events_url":"https://api.github.com/users/railsbridge/events{/privacy}","received_events_url":"https://api.github.com/users/railsbridge/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/railsbridge/bridge_troll","description":"Event management system for all the Bridges (RailsBridge, MobileBridge, GoBridge, etc!)","fork":false,"url":"https://api.github.com/repos/railsbridge/bridge_troll","forks_url":"https://api.github.com/repos/railsbridge/bridge_troll/forks","keys_url":"https://api.github.com/repos/railsbridge/bridge_troll/keys{/key_id}","collaborators_url":"https://api.github.com/repos/railsbridge/bridge_troll/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/railsbridge/bridge_troll/teams","hooks_url":"https://api.github.com/repos/railsbridge/bridge_troll/hooks","issue_events_url":"https://api.github.com/repos/railsbridge/bridge_troll/issues/events{/number}","events_url":"https://api.github.com/repos/railsbridge/bridge_troll/events","assignees_url":"https://api.github.com/repos/railsbridge/bridge_troll/assignees{/user}","branches_url":"https://api.github.com/repos/railsbridge/bridge_troll/branches{/branch}","tags_url":"https://api.github.com/repos/railsbridge/bridge_troll/tags","blobs_url":"https://api.github.com/repos/railsbridge/bridge_troll/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/railsbridge/bridge_troll/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/railsbridge/bridge_troll/git/refs{/sha}","trees_url":"https://api.github.com/repos/railsbridge/bridge_troll/git/trees{/sha}","statuses_url":"https://api.github.com/repos/railsbridge/bridge_troll/statuses/{sha}","languages_url":"https://api.github.com/repos/railsbridge/bridge_troll/languages","stargazers_url":"https://api.github.com/repos/railsbridge/bridge_troll/stargazers","contributors_url":"https://api.github.com/repos/railsbridge/bridge_troll/contributors","subscribers_url":"https://api.github.com/repos/railsbridge/bridge_troll/subscribers","subscription_url":"https://api.github.com/repos/railsbridge/bridge_troll/subscription","commits_url":"https://api.github.com/repos/railsbridge/bridge_troll/commits{/sha}","git_commits_url":"https://api.github.com/repos/railsbridge/bridge_troll/git/commits{/sha}","comments_url":"https://api.github.com/repos/railsbridge/bridge_troll/comments{/number}","issue_comment_url":"https://api.github.com/repos/railsbridge/bridge_troll/issues/comments{/number}","contents_url":"https://api.github.com/repos/railsbridge/bridge_troll/contents/{+path}","compare_url":"https://api.github.com/repos/railsbridge/bridge_troll/compare/{base}...{head}","merges_url":"https://api.github.com/repos/railsbridge/bridge_troll/merges","archive_url":"https://api.github.com/repos/railsbridge/bridge_troll/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/railsbridge/bridge_troll/downloads","issues_url":"https://api.github.com/repos/railsbridge/bridge_troll/issues{/number}","pulls_url":"https://api.github.com/repos/railsbridge/bridge_troll/pulls{/number}","milestones_url":"https://api.github.com/repos/railsbridge/bridge_troll/milestones{/number}","notifications_url":"https://api.github.com/repos/railsbridge/bridge_troll/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/railsbridge/bridge_troll/labels{/name}","releases_url":"https://api.github.com/repos/railsbridge/bridge_troll/releases{/id}","created_at":"2011-03-24T06:24:53Z","updated_at":"2015-12-14T14:06:52Z","pushed_at":"2015-12-22T21:19:59Z","git_url":"git://github.com/railsbridge/bridge_troll.git","ssh_url":"git@github.com:railsbridge/bridge_troll.git","clone_url":"https://github.com/railsbridge/bridge_troll.git","svn_url":"https://github.com/railsbridge/bridge_troll","homepage":"http://www.bridgetroll.org","size":5565,"stargazers_count":176,"watchers_count":176,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":196,"mirror_url":null,"open_issues_count":36,"forks":196,"open_issues":36,"watchers":176,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/railsbridge/bridge_troll/pulls/421"},"html":{"href":"https://github.com/railsbridge/bridge_troll/pull/421"},"issue":{"href":"https://api.github.com/repos/railsbridge/bridge_troll/issues/421"},"comments":{"href":"https://api.github.com/repos/railsbridge/bridge_troll/issues/421/comments"},"review_comments":{"href":"https://api.github.com/repos/railsbridge/bridge_troll/pulls/421/comments"},"review_comment":{"href":"https://api.github.com/repos/railsbridge/bridge_troll/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/railsbridge/bridge_troll/pulls/421/commits"},"statuses":{"href":"https://api.github.com/repos/railsbridge/bridge_troll/statuses/76bcf859fc76abd107b9bdfedb853e88c436234b"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":126,"deletions":10,"changed_files":10}}