{"action":"created","comment":{"url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/comments/41506183","id":41506183,"diff_hunk":"@@ -130,6 +130,16 @@ def link\n         end\n       end\n \n+      def page_for_link\n+        @page = Page.find(params[:id])\n+        @area_name = params[:area_name]\n+        @url_prefix = ''\n+        render partial: 'page_for_links',\n+          object: @page,\n+          locals: {area_name: @area_name},","path":"app/controllers/alchemy/admin/pages_controller.rb","position":10,"original_position":10,"commit_id":"0ad324001aa01c853baeb0fe3243f3e8fdf235c7","original_commit_id":"0ad324001aa01c853baeb0fe3243f3e8fdf235c7","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Style/AlignHash: Align the elements of a hash literal if they span more than one line.","created_at":"2015-10-08T12:26:32Z","updated_at":"2015-10-08T12:26:32Z","html_url":"https://github.com/AlchemyCMS/alchemy_cms/pull/889#discussion_r41506183","pull_request_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/889","_links":{"self":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/comments/41506183"},"html":{"href":"https://github.com/AlchemyCMS/alchemy_cms/pull/889#discussion_r41506183"},"pull_request":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/889"}}},"pull_request":{"url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/889","id":47144524,"html_url":"https://github.com/AlchemyCMS/alchemy_cms/pull/889","diff_url":"https://github.com/AlchemyCMS/alchemy_cms/pull/889.diff","patch_url":"https://github.com/AlchemyCMS/alchemy_cms/pull/889.patch","issue_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/889","number":889,"state":"open","locked":false,"title":"[feature] load pages asynchronously in link editor","user":{"login":"nicolai86","id":111324,"avatar_url":"https://avatars.githubusercontent.com/u/111324?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolai86","html_url":"https://github.com/nicolai86","followers_url":"https://api.github.com/users/nicolai86/followers","following_url":"https://api.github.com/users/nicolai86/following{/other_user}","gists_url":"https://api.github.com/users/nicolai86/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolai86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolai86/subscriptions","organizations_url":"https://api.github.com/users/nicolai86/orgs","repos_url":"https://api.github.com/users/nicolai86/repos","events_url":"https://api.github.com/users/nicolai86/events{/privacy}","received_events_url":"https://api.github.com/users/nicolai86/received_events","type":"User","site_admin":false},"body":"See #836 for a diskussion of the broad topic.\r\n\r\nThis is a first step into the direction of making alchemy support thousands of pages by not rendering them all the time. I've updated the link editor to work asynchronously using select2 with ajax requests to find pages by `urlname`. Apart from that no changes in functionality.\r\n\r\nThings to do:\r\n\r\n- [ ] unit & acceptance tests \r\n- [ ] tests for the modified JS, if we have any.\r\n\r\nMaybe I can also refactor the JS to use the select2 wrapper alchemy already uses.","created_at":"2015-10-08T12:10:46Z","updated_at":"2015-10-08T12:26:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3474f84543a84403abf5a98cafb7b0b60f2b6a31","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/889/commits","review_comments_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/889/comments","review_comment_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/889/comments","statuses_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/statuses/0ad324001aa01c853baeb0fe3243f3e8fdf235c7","head":{"label":"nicolai86:feature/improved-link-handling","ref":"feature/improved-link-handling","sha":"0ad324001aa01c853baeb0fe3243f3e8fdf235c7","user":{"login":"nicolai86","id":111324,"avatar_url":"https://avatars.githubusercontent.com/u/111324?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolai86","html_url":"https://github.com/nicolai86","followers_url":"https://api.github.com/users/nicolai86/followers","following_url":"https://api.github.com/users/nicolai86/following{/other_user}","gists_url":"https://api.github.com/users/nicolai86/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolai86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolai86/subscriptions","organizations_url":"https://api.github.com/users/nicolai86/orgs","repos_url":"https://api.github.com/users/nicolai86/repos","events_url":"https://api.github.com/users/nicolai86/events{/privacy}","received_events_url":"https://api.github.com/users/nicolai86/received_events","type":"User","site_admin":false},"repo":{"id":35404592,"name":"alchemy_cms","full_name":"nicolai86/alchemy_cms","owner":{"login":"nicolai86","id":111324,"avatar_url":"https://avatars.githubusercontent.com/u/111324?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolai86","html_url":"https://github.com/nicolai86","followers_url":"https://api.github.com/users/nicolai86/followers","following_url":"https://api.github.com/users/nicolai86/following{/other_user}","gists_url":"https://api.github.com/users/nicolai86/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolai86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolai86/subscriptions","organizations_url":"https://api.github.com/users/nicolai86/orgs","repos_url":"https://api.github.com/users/nicolai86/repos","events_url":"https://api.github.com/users/nicolai86/events{/privacy}","received_events_url":"https://api.github.com/users/nicolai86/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nicolai86/alchemy_cms","description":"Alchemy is a powerful, flexible and user centric Rails CMS.","fork":true,"url":"https://api.github.com/repos/nicolai86/alchemy_cms","forks_url":"https://api.github.com/repos/nicolai86/alchemy_cms/forks","keys_url":"https://api.github.com/repos/nicolai86/alchemy_cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nicolai86/alchemy_cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nicolai86/alchemy_cms/teams","hooks_url":"https://api.github.com/repos/nicolai86/alchemy_cms/hooks","issue_events_url":"https://api.github.com/repos/nicolai86/alchemy_cms/issues/events{/number}","events_url":"https://api.github.com/repos/nicolai86/alchemy_cms/events","assignees_url":"https://api.github.com/repos/nicolai86/alchemy_cms/assignees{/user}","branches_url":"https://api.github.com/repos/nicolai86/alchemy_cms/branches{/branch}","tags_url":"https://api.github.com/repos/nicolai86/alchemy_cms/tags","blobs_url":"https://api.github.com/repos/nicolai86/alchemy_cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nicolai86/alchemy_cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nicolai86/alchemy_cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/nicolai86/alchemy_cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nicolai86/alchemy_cms/statuses/{sha}","languages_url":"https://api.github.com/repos/nicolai86/alchemy_cms/languages","stargazers_url":"https://api.github.com/repos/nicolai86/alchemy_cms/stargazers","contributors_url":"https://api.github.com/repos/nicolai86/alchemy_cms/contributors","subscribers_url":"https://api.github.com/repos/nicolai86/alchemy_cms/subscribers","subscription_url":"https://api.github.com/repos/nicolai86/alchemy_cms/subscription","commits_url":"https://api.github.com/repos/nicolai86/alchemy_cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/nicolai86/alchemy_cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/nicolai86/alchemy_cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/nicolai86/alchemy_cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/nicolai86/alchemy_cms/contents/{+path}","compare_url":"https://api.github.com/repos/nicolai86/alchemy_cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nicolai86/alchemy_cms/merges","archive_url":"https://api.github.com/repos/nicolai86/alchemy_cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nicolai86/alchemy_cms/downloads","issues_url":"https://api.github.com/repos/nicolai86/alchemy_cms/issues{/number}","pulls_url":"https://api.github.com/repos/nicolai86/alchemy_cms/pulls{/number}","milestones_url":"https://api.github.com/repos/nicolai86/alchemy_cms/milestones{/number}","notifications_url":"https://api.github.com/repos/nicolai86/alchemy_cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nicolai86/alchemy_cms/labels{/name}","releases_url":"https://api.github.com/repos/nicolai86/alchemy_cms/releases{/id}","created_at":"2015-05-11T05:44:50Z","updated_at":"2015-05-11T05:44:52Z","pushed_at":"2015-10-08T12:26:26Z","git_url":"git://github.com/nicolai86/alchemy_cms.git","ssh_url":"git@github.com:nicolai86/alchemy_cms.git","clone_url":"https://github.com/nicolai86/alchemy_cms.git","svn_url":"https://github.com/nicolai86/alchemy_cms","homepage":"http://alchemy-cms.com","size":15245,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"AlchemyCMS:master","ref":"master","sha":"a6fb572d3c9cfa1e1ee14d6683fac498a8d21d71","user":{"login":"AlchemyCMS","id":6218554,"avatar_url":"https://avatars.githubusercontent.com/u/6218554?v=3","gravatar_id":"","url":"https://api.github.com/users/AlchemyCMS","html_url":"https://github.com/AlchemyCMS","followers_url":"https://api.github.com/users/AlchemyCMS/followers","following_url":"https://api.github.com/users/AlchemyCMS/following{/other_user}","gists_url":"https://api.github.com/users/AlchemyCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/AlchemyCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlchemyCMS/subscriptions","organizations_url":"https://api.github.com/users/AlchemyCMS/orgs","repos_url":"https://api.github.com/users/AlchemyCMS/repos","events_url":"https://api.github.com/users/AlchemyCMS/events{/privacy}","received_events_url":"https://api.github.com/users/AlchemyCMS/received_events","type":"Organization","site_admin":false},"repo":{"id":1581769,"name":"alchemy_cms","full_name":"AlchemyCMS/alchemy_cms","owner":{"login":"AlchemyCMS","id":6218554,"avatar_url":"https://avatars.githubusercontent.com/u/6218554?v=3","gravatar_id":"","url":"https://api.github.com/users/AlchemyCMS","html_url":"https://github.com/AlchemyCMS","followers_url":"https://api.github.com/users/AlchemyCMS/followers","following_url":"https://api.github.com/users/AlchemyCMS/following{/other_user}","gists_url":"https://api.github.com/users/AlchemyCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/AlchemyCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlchemyCMS/subscriptions","organizations_url":"https://api.github.com/users/AlchemyCMS/orgs","repos_url":"https://api.github.com/users/AlchemyCMS/repos","events_url":"https://api.github.com/users/AlchemyCMS/events{/privacy}","received_events_url":"https://api.github.com/users/AlchemyCMS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AlchemyCMS/alchemy_cms","description":"Alchemy is a powerful, flexible and user centric Rails CMS.","fork":false,"url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms","forks_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/forks","keys_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/teams","hooks_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/hooks","issue_events_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/events{/number}","events_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/events","assignees_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/assignees{/user}","branches_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/branches{/branch}","tags_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/tags","blobs_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/statuses/{sha}","languages_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/languages","stargazers_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/stargazers","contributors_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/contributors","subscribers_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/subscribers","subscription_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/subscription","commits_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/contents/{+path}","compare_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/merges","archive_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/downloads","issues_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues{/number}","pulls_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls{/number}","milestones_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/milestones{/number}","notifications_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/labels{/name}","releases_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/releases{/id}","created_at":"2011-04-07T10:37:01Z","updated_at":"2015-10-01T14:20:35Z","pushed_at":"2015-10-08T12:26:27Z","git_url":"git://github.com/AlchemyCMS/alchemy_cms.git","ssh_url":"git@github.com:AlchemyCMS/alchemy_cms.git","clone_url":"https://github.com/AlchemyCMS/alchemy_cms.git","svn_url":"https://github.com/AlchemyCMS/alchemy_cms","homepage":"http://alchemy-cms.com","size":22066,"stargazers_count":341,"watchers_count":341,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":158,"mirror_url":null,"open_issues_count":33,"forks":158,"open_issues":33,"watchers":341,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/889"},"html":{"href":"https://github.com/AlchemyCMS/alchemy_cms/pull/889"},"issue":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/889"},"comments":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/889/comments"},"review_comments":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/889/comments"},"review_comment":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/889/commits"},"statuses":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/statuses/0ad324001aa01c853baeb0fe3243f3e8fdf235c7"}}}}