{"action":"created","comment":{"url":"https://api.github.com/repos/thoughtbot/administrate/pulls/comments/187480718","pull_request_review_id":119272437,"id":187480718,"diff_hunk":"@@ -17,67 +18,61 @@\n \n   describe \"#associated_collection\" do\n     it \"returns an index page for the dashboard of the associated attribute\" do\n-      begin\n-        WidgetDashboard = Class.new\n-        widgets = []\n-        field = Administrate::Field::HasMany.new(:widgets, widgets, :show)\n+      WidgetDashboard = Class.new\n+      widgets = []\n+      field = Administrate::Field::HasMany.new(:widgets, widgets, :show)\n \n-        page = field.associated_collection\n+      page = field.associated_collection\n \n-        expect(page).to be_instance_of(Administrate::Page::Collection)\n-      ensure\n-        remove_constants :WidgetDashboard\n-      end\n+      expect(page).to be_instance_of(Administrate::Page::Collection)\n+    ensure\n+      remove_constants :WidgetDashboard\n     end\n   end\n \n   describe \"class_name option\" do\n     it \"determines what dashboard is used to present the association\" do\n-      begin\n-        FooDashboard = Class.new\n-        dashboard_double = double(collection_attributes: [])\n-        allow(FooDashboard).to receive(:new).and_return(dashboard_double)\n-\n-        association = Administrate::Field::HasMany.\n-          with_options(class_name: \"Foo\")\n-        field = association.new(:customers, [], :show)\n-        collection = field.associated_collection\n-        attributes = collection.attribute_names\n-\n-        expect(dashboard_double).to have_received(:collection_attributes)\n-        expect(attributes).to eq([])\n-      ensure\n-        remove_constants :FooDashboard\n-      end\n+      FooDashboard = Class.new\n+      dashboard_double = double(collection_attributes: [])\n+      allow(FooDashboard).to receive(:new).and_return(dashboard_double)\n+\n+      association = Administrate::Field::HasMany.\n+        with_options(class_name: \"Foo\")\n+      field = association.new(:customers, [], :show)\n+      collection = field.associated_collection\n+      attributes = collection.attribute_names\n+\n+      expect(dashboard_double).to have_received(:collection_attributes)\n+      expect(attributes).to eq([])\n+    ensure\n+      remove_constants :FooDashboard\n     end\n   end\n \n   describe \"primary_key option\" do\n     it \"determines what primary key is used on the relationship for the form\" do\n-      begin\n-        Foo = Class.new\n-        FooDashboard = Class.new\n-        uuid = SecureRandom.uuid\n-        allow(Foo).to receive(:all).and_return([Foo])\n-        allow(Foo).to receive(:uuid).and_return(uuid)\n-        allow(Foo).to receive(:id).and_return(1)\n-        allow_any_instance_of(FooDashboard).to(\n-          receive(:display_resource).and_return(uuid)\n+      Foo = Class.new\n+      FooDashboard = Class.new\n+      uuid = SecureRandom.uuid\n+      allow(Foo).to receive(:all).and_return([Foo])\n+      allow(Foo).to receive(:uuid).and_return(uuid)\n+      allow(Foo).to receive(:id).and_return(1)\n+      allow_any_instance_of(FooDashboard).to(\n+        receive(:display_resource).and_return(uuid),\n+      )\n+\n+      association =\n+        Administrate::Field::HasMany.with_options(\n+          primary_key: \"uuid\", class_name: \"Foo\",\n         )\n-\n-        association =\n-          Administrate::Field::HasMany.with_options(\n-            primary_key: \"uuid\", class_name: \"Foo\"\n-          )\n-        field = association.new(:customers, [], :show)\n-        field.associated_resource_options\n-\n-        expect(Foo).to have_received(:all)\n-        expect(Foo).to have_received(:uuid)\n-        expect(Foo).not_to have_received(:id)\n-      ensure\n-        remove_constants :Foo, :FooDashboard\n-      end\n+      field = association.new(:customers, [], :show)\n+      field.associated_resource_options\n+\n+      expect(Foo).to have_received(:all)\n+      expect(Foo).to have_received(:uuid)\n+      expect(Foo).not_to have_received(:id)\n+    ensure","path":"spec/lib/fields/has_many_spec.rb","position":113,"original_position":113,"commit_id":"efa044c86a8d2a5fa700dd32ff088149a6fb93ae","original_commit_id":"efa044c86a8d2a5fa700dd32ff088149a6fb93ae","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Lint/Syntax: unexpected token kENSURE","created_at":"2018-05-10T22:45:50Z","updated_at":"2018-05-10T22:45:51Z","html_url":"https://github.com/thoughtbot/administrate/pull/1120#discussion_r187480718","pull_request_url":"https://api.github.com/repos/thoughtbot/administrate/pulls/1120","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/administrate/pulls/comments/187480718"},"html":{"href":"https://github.com/thoughtbot/administrate/pull/1120#discussion_r187480718"},"pull_request":{"href":"https://api.github.com/repos/thoughtbot/administrate/pulls/1120"}}},"pull_request":{"url":"https://api.github.com/repos/thoughtbot/administrate/pulls/1120","id":175681175,"html_url":"https://github.com/thoughtbot/administrate/pull/1120","diff_url":"https://github.com/thoughtbot/administrate/pull/1120.diff","patch_url":"https://github.com/thoughtbot/administrate/pull/1120.patch","issue_url":"https://api.github.com/repos/thoughtbot/administrate/issues/1120","number":1120,"state":"open","locked":false,"title":"Ability to export an index page in CSV","user":{"login":"pustomytnyk","id":9644824,"avatar_url":"https://avatars3.githubusercontent.com/u/9644824?v=4","gravatar_id":"","url":"https://api.github.com/users/pustomytnyk","html_url":"https://github.com/pustomytnyk","followers_url":"https://api.github.com/users/pustomytnyk/followers","following_url":"https://api.github.com/users/pustomytnyk/following{/other_user}","gists_url":"https://api.github.com/users/pustomytnyk/gists{/gist_id}","starred_url":"https://api.github.com/users/pustomytnyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pustomytnyk/subscriptions","organizations_url":"https://api.github.com/users/pustomytnyk/orgs","repos_url":"https://api.github.com/users/pustomytnyk/repos","events_url":"https://api.github.com/users/pustomytnyk/events{/privacy}","received_events_url":"https://api.github.com/users/pustomytnyk/received_events","type":"User","site_admin":false},"body":"Based on @BenMorganIO implementation from #782.\r\n\r\n- [x] Show export button on index page if the action is allowed\r\n\r\n- [x] Render into CSV same columns as on page. Render ALL records, not only those of current page.\r\n\r\n- [x] Tests for CSV export\r\n\r\n- [ ] Tests for all field types rendered properly in CSV\r\n\r\n- [ ] Translations","created_at":"2018-03-17T03:34:27Z","updated_at":"2018-05-10T22:45:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef3617269289aeea69d72297b16323b0f2c5e776","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/thoughtbot/administrate/pulls/1120/commits","review_comments_url":"https://api.github.com/repos/thoughtbot/administrate/pulls/1120/comments","review_comment_url":"https://api.github.com/repos/thoughtbot/administrate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thoughtbot/administrate/issues/1120/comments","statuses_url":"https://api.github.com/repos/thoughtbot/administrate/statuses/efa044c86a8d2a5fa700dd32ff088149a6fb93ae","head":{"label":"pustomytnyk:csv","ref":"csv","sha":"efa044c86a8d2a5fa700dd32ff088149a6fb93ae","user":{"login":"pustomytnyk","id":9644824,"avatar_url":"https://avatars3.githubusercontent.com/u/9644824?v=4","gravatar_id":"","url":"https://api.github.com/users/pustomytnyk","html_url":"https://github.com/pustomytnyk","followers_url":"https://api.github.com/users/pustomytnyk/followers","following_url":"https://api.github.com/users/pustomytnyk/following{/other_user}","gists_url":"https://api.github.com/users/pustomytnyk/gists{/gist_id}","starred_url":"https://api.github.com/users/pustomytnyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pustomytnyk/subscriptions","organizations_url":"https://api.github.com/users/pustomytnyk/orgs","repos_url":"https://api.github.com/users/pustomytnyk/repos","events_url":"https://api.github.com/users/pustomytnyk/events{/privacy}","received_events_url":"https://api.github.com/users/pustomytnyk/received_events","type":"User","site_admin":false},"repo":{"id":83717716,"name":"administrate","full_name":"pustomytnyk/administrate","owner":{"login":"pustomytnyk","id":9644824,"avatar_url":"https://avatars3.githubusercontent.com/u/9644824?v=4","gravatar_id":"","url":"https://api.github.com/users/pustomytnyk","html_url":"https://github.com/pustomytnyk","followers_url":"https://api.github.com/users/pustomytnyk/followers","following_url":"https://api.github.com/users/pustomytnyk/following{/other_user}","gists_url":"https://api.github.com/users/pustomytnyk/gists{/gist_id}","starred_url":"https://api.github.com/users/pustomytnyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pustomytnyk/subscriptions","organizations_url":"https://api.github.com/users/pustomytnyk/orgs","repos_url":"https://api.github.com/users/pustomytnyk/repos","events_url":"https://api.github.com/users/pustomytnyk/events{/privacy}","received_events_url":"https://api.github.com/users/pustomytnyk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pustomytnyk/administrate","description":"A Rails engine that helps you put together a super-flexible admin dashboard.","fork":true,"url":"https://api.github.com/repos/pustomytnyk/administrate","forks_url":"https://api.github.com/repos/pustomytnyk/administrate/forks","keys_url":"https://api.github.com/repos/pustomytnyk/administrate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pustomytnyk/administrate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pustomytnyk/administrate/teams","hooks_url":"https://api.github.com/repos/pustomytnyk/administrate/hooks","issue_events_url":"https://api.github.com/repos/pustomytnyk/administrate/issues/events{/number}","events_url":"https://api.github.com/repos/pustomytnyk/administrate/events","assignees_url":"https://api.github.com/repos/pustomytnyk/administrate/assignees{/user}","branches_url":"https://api.github.com/repos/pustomytnyk/administrate/branches{/branch}","tags_url":"https://api.github.com/repos/pustomytnyk/administrate/tags","blobs_url":"https://api.github.com/repos/pustomytnyk/administrate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pustomytnyk/administrate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pustomytnyk/administrate/git/refs{/sha}","trees_url":"https://api.github.com/repos/pustomytnyk/administrate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pustomytnyk/administrate/statuses/{sha}","languages_url":"https://api.github.com/repos/pustomytnyk/administrate/languages","stargazers_url":"https://api.github.com/repos/pustomytnyk/administrate/stargazers","contributors_url":"https://api.github.com/repos/pustomytnyk/administrate/contributors","subscribers_url":"https://api.github.com/repos/pustomytnyk/administrate/subscribers","subscription_url":"https://api.github.com/repos/pustomytnyk/administrate/subscription","commits_url":"https://api.github.com/repos/pustomytnyk/administrate/commits{/sha}","git_commits_url":"https://api.github.com/repos/pustomytnyk/administrate/git/commits{/sha}","comments_url":"https://api.github.com/repos/pustomytnyk/administrate/comments{/number}","issue_comment_url":"https://api.github.com/repos/pustomytnyk/administrate/issues/comments{/number}","contents_url":"https://api.github.com/repos/pustomytnyk/administrate/contents/{+path}","compare_url":"https://api.github.com/repos/pustomytnyk/administrate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pustomytnyk/administrate/merges","archive_url":"https://api.github.com/repos/pustomytnyk/administrate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pustomytnyk/administrate/downloads","issues_url":"https://api.github.com/repos/pustomytnyk/administrate/issues{/number}","pulls_url":"https://api.github.com/repos/pustomytnyk/administrate/pulls{/number}","milestones_url":"https://api.github.com/repos/pustomytnyk/administrate/milestones{/number}","notifications_url":"https://api.github.com/repos/pustomytnyk/administrate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pustomytnyk/administrate/labels{/name}","releases_url":"https://api.github.com/repos/pustomytnyk/administrate/releases{/id}","deployments_url":"https://api.github.com/repos/pustomytnyk/administrate/deployments","created_at":"2017-03-02T19:43:34Z","updated_at":"2017-03-02T19:43:37Z","pushed_at":"2018-05-10T22:45:23Z","git_url":"git://github.com/pustomytnyk/administrate.git","ssh_url":"git@github.com:pustomytnyk/administrate.git","clone_url":"https://github.com/pustomytnyk/administrate.git","svn_url":"https://github.com/pustomytnyk/administrate","homepage":"http://administrate-prototype.herokuapp.com/admin","size":1318,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"thoughtbot:master","ref":"master","sha":"f94c2609fed89aa331e858c842e7cc3c2f3e1b16","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars3.githubusercontent.com/u/6183?v=4","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":33739333,"name":"administrate","full_name":"thoughtbot/administrate","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars3.githubusercontent.com/u/6183?v=4","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/administrate","description":"A Rails engine that helps you put together a super-flexible admin dashboard.","fork":false,"url":"https://api.github.com/repos/thoughtbot/administrate","forks_url":"https://api.github.com/repos/thoughtbot/administrate/forks","keys_url":"https://api.github.com/repos/thoughtbot/administrate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/administrate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/administrate/teams","hooks_url":"https://api.github.com/repos/thoughtbot/administrate/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/administrate/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/administrate/events","assignees_url":"https://api.github.com/repos/thoughtbot/administrate/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/administrate/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/administrate/tags","blobs_url":"https://api.github.com/repos/thoughtbot/administrate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/administrate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/administrate/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/administrate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/administrate/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/administrate/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/administrate/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/administrate/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/administrate/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/administrate/subscription","commits_url":"https://api.github.com/repos/thoughtbot/administrate/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/administrate/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/administrate/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/administrate/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/administrate/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/administrate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/administrate/merges","archive_url":"https://api.github.com/repos/thoughtbot/administrate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/administrate/downloads","issues_url":"https://api.github.com/repos/thoughtbot/administrate/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/administrate/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/administrate/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/administrate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/administrate/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/administrate/releases{/id}","deployments_url":"https://api.github.com/repos/thoughtbot/administrate/deployments","created_at":"2015-04-10T16:43:02Z","updated_at":"2018-05-10T21:35:50Z","pushed_at":"2018-05-10T22:45:26Z","git_url":"git://github.com/thoughtbot/administrate.git","ssh_url":"git@github.com:thoughtbot/administrate.git","clone_url":"https://github.com/thoughtbot/administrate.git","svn_url":"https://github.com/thoughtbot/administrate","homepage":"http://administrate-prototype.herokuapp.com/admin","size":1248,"stargazers_count":3881,"watchers_count":3881,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":667,"mirror_url":null,"archived":false,"open_issues_count":182,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":667,"open_issues":182,"watchers":3881,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/administrate/pulls/1120"},"html":{"href":"https://github.com/thoughtbot/administrate/pull/1120"},"issue":{"href":"https://api.github.com/repos/thoughtbot/administrate/issues/1120"},"comments":{"href":"https://api.github.com/repos/thoughtbot/administrate/issues/1120/comments"},"review_comments":{"href":"https://api.github.com/repos/thoughtbot/administrate/pulls/1120/comments"},"review_comment":{"href":"https://api.github.com/repos/thoughtbot/administrate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thoughtbot/administrate/pulls/1120/commits"},"statuses":{"href":"https://api.github.com/repos/thoughtbot/administrate/statuses/efa044c86a8d2a5fa700dd32ff088149a6fb93ae"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"houndci-bot"}}