{"action":"created","comment":{"url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/pulls/comments/38016490","id":38016490,"diff_hunk":"@@ -350,4 +350,61 @@\n     expect(InappropiateFlag.flagged?(user, debate)).to_not be\n   end\n \n+  feature 'Debate index order filters', :js do\n+\n+    before do \n+      @debates = [create(:debate), create(:debate), create(:debate)]","path":"spec/features/debates_spec.rb","position":7,"original_position":7,"commit_id":"52093ff64e9f8da305aa61e6efd7a703bf20fbc7","original_commit_id":"52093ff64e9f8da305aa61e6efd7a703bf20fbc7","user":{"login":"kikito","id":63131,"avatar_url":"https://avatars.githubusercontent.com/u/63131?v=3","gravatar_id":"","url":"https://api.github.com/users/kikito","html_url":"https://github.com/kikito","followers_url":"https://api.github.com/users/kikito/followers","following_url":"https://api.github.com/users/kikito/following{/other_user}","gists_url":"https://api.github.com/users/kikito/gists{/gist_id}","starred_url":"https://api.github.com/users/kikito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kikito/subscriptions","organizations_url":"https://api.github.com/users/kikito/orgs","repos_url":"https://api.github.com/users/kikito/repos","events_url":"https://api.github.com/users/kikito/events{/privacy}","received_events_url":"https://api.github.com/users/kikito/received_events","type":"User","site_admin":false},"body":"Al usar un array llamado `@debates`, en tus tests luego tienes que utilizar \"números mágicos\" (e.g. `@debates[2]`). Hace el código bastante difícil de entender. En lugar de eso, crea tres variables - podrías llamarlas `debate1`, `debate2` y `debate3`, pero si puedes dales un nombre más ilustrativo (por ejemplo `most_voted_debate` o `most_recent_debate`).","created_at":"2015-08-26T18:22:38Z","updated_at":"2015-08-26T18:22:38Z","html_url":"https://github.com/AyuntamientoMadrid/participacion/pull/254#discussion_r38016490","pull_request_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/pulls/254","_links":{"self":{"href":"https://api.github.com/repos/AyuntamientoMadrid/participacion/pulls/comments/38016490"},"html":{"href":"https://github.com/AyuntamientoMadrid/participacion/pull/254#discussion_r38016490"},"pull_request":{"href":"https://api.github.com/repos/AyuntamientoMadrid/participacion/pulls/254"}}},"pull_request":{"url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/pulls/254","id":43424087,"html_url":"https://github.com/AyuntamientoMadrid/participacion/pull/254","diff_url":"https://github.com/AyuntamientoMadrid/participacion/pull/254.diff","patch_url":"https://github.com/AyuntamientoMadrid/participacion/pull/254.patch","issue_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/issues/254","number":254,"state":"open","locked":false,"title":"Add filters to specify order of debates on /debates page","user":{"login":"mlovic","id":7111622,"avatar_url":"https://avatars.githubusercontent.com/u/7111622?v=3","gravatar_id":"","url":"https://api.github.com/users/mlovic","html_url":"https://github.com/mlovic","followers_url":"https://api.github.com/users/mlovic/followers","following_url":"https://api.github.com/users/mlovic/following{/other_user}","gists_url":"https://api.github.com/users/mlovic/gists{/gist_id}","starred_url":"https://api.github.com/users/mlovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlovic/subscriptions","organizations_url":"https://api.github.com/users/mlovic/orgs","repos_url":"https://api.github.com/users/mlovic/repos","events_url":"https://api.github.com/users/mlovic/events{/privacy}","received_events_url":"https://api.github.com/users/mlovic/received_events","type":"User","site_admin":false},"body":"Allows user to select one of three filters to specify the order in which debates are listed on /debates page. 'Sort by newest' is the default. Issue #193\r\n\r\nAll tests pass except for `\"I18n does not have unused keys\"` as some of these are generated dynamically in `app/views/debates/_filter_selector.erb`","created_at":"2015-08-26T16:40:58Z","updated_at":"2015-08-26T18:22:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c8d728275cc9c8cf9b68a14eef0f8ec1874cfb92","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/pulls/254/commits","review_comments_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/pulls/254/comments","review_comment_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/issues/254/comments","statuses_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/statuses/52093ff64e9f8da305aa61e6efd7a703bf20fbc7","head":{"label":"mlovic:filter-debates","ref":"filter-debates","sha":"52093ff64e9f8da305aa61e6efd7a703bf20fbc7","user":{"login":"mlovic","id":7111622,"avatar_url":"https://avatars.githubusercontent.com/u/7111622?v=3","gravatar_id":"","url":"https://api.github.com/users/mlovic","html_url":"https://github.com/mlovic","followers_url":"https://api.github.com/users/mlovic/followers","following_url":"https://api.github.com/users/mlovic/following{/other_user}","gists_url":"https://api.github.com/users/mlovic/gists{/gist_id}","starred_url":"https://api.github.com/users/mlovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlovic/subscriptions","organizations_url":"https://api.github.com/users/mlovic/orgs","repos_url":"https://api.github.com/users/mlovic/repos","events_url":"https://api.github.com/users/mlovic/events{/privacy}","received_events_url":"https://api.github.com/users/mlovic/received_events","type":"User","site_admin":false},"repo":{"id":41027869,"name":"participacion","full_name":"mlovic/participacion","owner":{"login":"mlovic","id":7111622,"avatar_url":"https://avatars.githubusercontent.com/u/7111622?v=3","gravatar_id":"","url":"https://api.github.com/users/mlovic","html_url":"https://github.com/mlovic","followers_url":"https://api.github.com/users/mlovic/followers","following_url":"https://api.github.com/users/mlovic/following{/other_user}","gists_url":"https://api.github.com/users/mlovic/gists{/gist_id}","starred_url":"https://api.github.com/users/mlovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlovic/subscriptions","organizations_url":"https://api.github.com/users/mlovic/orgs","repos_url":"https://api.github.com/users/mlovic/repos","events_url":"https://api.github.com/users/mlovic/events{/privacy}","received_events_url":"https://api.github.com/users/mlovic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mlovic/participacion","description":"","fork":true,"url":"https://api.github.com/repos/mlovic/participacion","forks_url":"https://api.github.com/repos/mlovic/participacion/forks","keys_url":"https://api.github.com/repos/mlovic/participacion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mlovic/participacion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mlovic/participacion/teams","hooks_url":"https://api.github.com/repos/mlovic/participacion/hooks","issue_events_url":"https://api.github.com/repos/mlovic/participacion/issues/events{/number}","events_url":"https://api.github.com/repos/mlovic/participacion/events","assignees_url":"https://api.github.com/repos/mlovic/participacion/assignees{/user}","branches_url":"https://api.github.com/repos/mlovic/participacion/branches{/branch}","tags_url":"https://api.github.com/repos/mlovic/participacion/tags","blobs_url":"https://api.github.com/repos/mlovic/participacion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mlovic/participacion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mlovic/participacion/git/refs{/sha}","trees_url":"https://api.github.com/repos/mlovic/participacion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mlovic/participacion/statuses/{sha}","languages_url":"https://api.github.com/repos/mlovic/participacion/languages","stargazers_url":"https://api.github.com/repos/mlovic/participacion/stargazers","contributors_url":"https://api.github.com/repos/mlovic/participacion/contributors","subscribers_url":"https://api.github.com/repos/mlovic/participacion/subscribers","subscription_url":"https://api.github.com/repos/mlovic/participacion/subscription","commits_url":"https://api.github.com/repos/mlovic/participacion/commits{/sha}","git_commits_url":"https://api.github.com/repos/mlovic/participacion/git/commits{/sha}","comments_url":"https://api.github.com/repos/mlovic/participacion/comments{/number}","issue_comment_url":"https://api.github.com/repos/mlovic/participacion/issues/comments{/number}","contents_url":"https://api.github.com/repos/mlovic/participacion/contents/{+path}","compare_url":"https://api.github.com/repos/mlovic/participacion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mlovic/participacion/merges","archive_url":"https://api.github.com/repos/mlovic/participacion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mlovic/participacion/downloads","issues_url":"https://api.github.com/repos/mlovic/participacion/issues{/number}","pulls_url":"https://api.github.com/repos/mlovic/participacion/pulls{/number}","milestones_url":"https://api.github.com/repos/mlovic/participacion/milestones{/number}","notifications_url":"https://api.github.com/repos/mlovic/participacion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mlovic/participacion/labels{/name}","releases_url":"https://api.github.com/repos/mlovic/participacion/releases{/id}","created_at":"2015-08-19T10:29:45Z","updated_at":"2015-08-19T10:29:45Z","pushed_at":"2015-08-26T16:18:14Z","git_url":"git://github.com/mlovic/participacion.git","ssh_url":"git@github.com:mlovic/participacion.git","clone_url":"https://github.com/mlovic/participacion.git","svn_url":"https://github.com/mlovic/participacion","homepage":null,"size":4268,"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":"AyuntamientoMadrid:master","ref":"master","sha":"54bed9e515640ba54fd9dc427cefed0327195784","user":{"login":"AyuntamientoMadrid","id":13286342,"avatar_url":"https://avatars.githubusercontent.com/u/13286342?v=3","gravatar_id":"","url":"https://api.github.com/users/AyuntamientoMadrid","html_url":"https://github.com/AyuntamientoMadrid","followers_url":"https://api.github.com/users/AyuntamientoMadrid/followers","following_url":"https://api.github.com/users/AyuntamientoMadrid/following{/other_user}","gists_url":"https://api.github.com/users/AyuntamientoMadrid/gists{/gist_id}","starred_url":"https://api.github.com/users/AyuntamientoMadrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AyuntamientoMadrid/subscriptions","organizations_url":"https://api.github.com/users/AyuntamientoMadrid/orgs","repos_url":"https://api.github.com/users/AyuntamientoMadrid/repos","events_url":"https://api.github.com/users/AyuntamientoMadrid/events{/privacy}","received_events_url":"https://api.github.com/users/AyuntamientoMadrid/received_events","type":"Organization","site_admin":false},"repo":{"id":39152554,"name":"participacion","full_name":"AyuntamientoMadrid/participacion","owner":{"login":"AyuntamientoMadrid","id":13286342,"avatar_url":"https://avatars.githubusercontent.com/u/13286342?v=3","gravatar_id":"","url":"https://api.github.com/users/AyuntamientoMadrid","html_url":"https://github.com/AyuntamientoMadrid","followers_url":"https://api.github.com/users/AyuntamientoMadrid/followers","following_url":"https://api.github.com/users/AyuntamientoMadrid/following{/other_user}","gists_url":"https://api.github.com/users/AyuntamientoMadrid/gists{/gist_id}","starred_url":"https://api.github.com/users/AyuntamientoMadrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AyuntamientoMadrid/subscriptions","organizations_url":"https://api.github.com/users/AyuntamientoMadrid/orgs","repos_url":"https://api.github.com/users/AyuntamientoMadrid/repos","events_url":"https://api.github.com/users/AyuntamientoMadrid/events{/privacy}","received_events_url":"https://api.github.com/users/AyuntamientoMadrid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AyuntamientoMadrid/participacion","description":"","fork":false,"url":"https://api.github.com/repos/AyuntamientoMadrid/participacion","forks_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/forks","keys_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/teams","hooks_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/hooks","issue_events_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/issues/events{/number}","events_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/events","assignees_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/assignees{/user}","branches_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/branches{/branch}","tags_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/tags","blobs_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/git/refs{/sha}","trees_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/statuses/{sha}","languages_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/languages","stargazers_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/stargazers","contributors_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/contributors","subscribers_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/subscribers","subscription_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/subscription","commits_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/commits{/sha}","git_commits_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/git/commits{/sha}","comments_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/comments{/number}","issue_comment_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/issues/comments{/number}","contents_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/contents/{+path}","compare_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/merges","archive_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/downloads","issues_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/issues{/number}","pulls_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/pulls{/number}","milestones_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/milestones{/number}","notifications_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/labels{/name}","releases_url":"https://api.github.com/repos/AyuntamientoMadrid/participacion/releases{/id}","created_at":"2015-07-15T18:04:16Z","updated_at":"2015-08-24T23:38:07Z","pushed_at":"2015-08-26T18:06:30Z","git_url":"git://github.com/AyuntamientoMadrid/participacion.git","ssh_url":"git@github.com:AyuntamientoMadrid/participacion.git","clone_url":"https://github.com/AyuntamientoMadrid/participacion.git","svn_url":"https://github.com/AyuntamientoMadrid/participacion","homepage":null,"size":6666,"stargazers_count":149,"watchers_count":149,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"open_issues_count":26,"forks":36,"open_issues":26,"watchers":149,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AyuntamientoMadrid/participacion/pulls/254"},"html":{"href":"https://github.com/AyuntamientoMadrid/participacion/pull/254"},"issue":{"href":"https://api.github.com/repos/AyuntamientoMadrid/participacion/issues/254"},"comments":{"href":"https://api.github.com/repos/AyuntamientoMadrid/participacion/issues/254/comments"},"review_comments":{"href":"https://api.github.com/repos/AyuntamientoMadrid/participacion/pulls/254/comments"},"review_comment":{"href":"https://api.github.com/repos/AyuntamientoMadrid/participacion/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AyuntamientoMadrid/participacion/pulls/254/commits"},"statuses":{"href":"https://api.github.com/repos/AyuntamientoMadrid/participacion/statuses/52093ff64e9f8da305aa61e6efd7a703bf20fbc7"}}}}