{"action":"created","comment":{"url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/comments/84896993","pull_request_review_id":5644566,"id":84896993,"diff_hunk":"@@ -0,0 +1,61 @@\n+require 'active_record'\n+\n+class WidgetSamplesDatatable < AjaxDatatablesRails::Base\n+  include SamplesHelper\n+\n+  def initialize(view,\n+                 organization,\n+                 my_module)\n+    super(view)\n+    @organization = organization\n+    @my_module = my_module\n+  end\n+\n+  def sortable_columns\n+    sort_array = [\n+      'Sample.name',\n+      'SampleType.name',\n+      'SampleGroup.name',\n+      'Sample.created_at',\n+      'User.full_name'\n+    ]\n+\n+    @sortable_columns ||= sort_array\n+  end\n+\n+  private\n+\n+  # Returns json of current samples\n+  def data\n+    records.map do |record|\n+      sample = {\n+        '0': record.name,\n+        '1': if record.sample_type.nil?\n+               I18n.t('samples.table.no_type')\n+             else\n+               record.sample_type.name\n+             end,\n+        '2': if record.sample_group.nil?\n+               \"<span class='glyphicon glyphicon-asterisk'></span> \" +\n+                 I18n.t('samples.table.no_group')\n+             else\n+               \"<span class='glyphicon glyphicon-asterisk'\n+               style='color: #{record.sample_group.color}'></span> \" +\n+                 record.sample_group.name\n+             end,\n+        '3': I18n.l(record.created_at, format: :full),\n+        '4': record.user.full_name\n+      }\n+\n+      sample\n+    end\n+  end\n+\n+  def get_raw_records","path":"app/datatables/widget_samples_datatable.rb","position":54,"original_position":54,"commit_id":"f10ce78b65d812bd8554ab81a4f71b12ce28796a","original_commit_id":"f10ce78b65d812bd8554ab81a4f71b12ce28796a","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","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":"Do not prefix reader method names with get_.","created_at":"2016-10-25T13:07:54Z","updated_at":"2016-10-25T13:07:54Z","html_url":"https://github.com/biosistemika/scinote-web/pull/242#discussion_r84896993","pull_request_url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/242","_links":{"self":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/comments/84896993"},"html":{"href":"https://github.com/biosistemika/scinote-web/pull/242#discussion_r84896993"},"pull_request":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/242"}}},"pull_request":{"url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/242","id":90638767,"html_url":"https://github.com/biosistemika/scinote-web/pull/242","diff_url":"https://github.com/biosistemika/scinote-web/pull/242.diff","patch_url":"https://github.com/biosistemika/scinote-web/pull/242.patch","issue_url":"https://api.github.com/repos/biosistemika/scinote-web/issues/242","number":242,"state":"open","locked":false,"title":"Add samples widget view [SCI-580]","user":{"login":"okriuchykhin","id":22216856,"avatar_url":"https://avatars.githubusercontent.com/u/22216856?v=3","gravatar_id":"","url":"https://api.github.com/users/okriuchykhin","html_url":"https://github.com/okriuchykhin","followers_url":"https://api.github.com/users/okriuchykhin/followers","following_url":"https://api.github.com/users/okriuchykhin/following{/other_user}","gists_url":"https://api.github.com/users/okriuchykhin/gists{/gist_id}","starred_url":"https://api.github.com/users/okriuchykhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okriuchykhin/subscriptions","organizations_url":"https://api.github.com/users/okriuchykhin/orgs","repos_url":"https://api.github.com/users/okriuchykhin/repos","events_url":"https://api.github.com/users/okriuchykhin/events{/privacy}","received_events_url":"https://api.github.com/users/okriuchykhin/received_events","type":"User","site_admin":false},"body":"https://biosistemika.atlassian.net/browse/SCI-580","created_at":"2016-10-24T15:43:02Z","updated_at":"2016-10-25T13:07:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f2fec27ac14d935941279327494758d7eae498f","assignee":{"login":"okriuchykhin","id":22216856,"avatar_url":"https://avatars.githubusercontent.com/u/22216856?v=3","gravatar_id":"","url":"https://api.github.com/users/okriuchykhin","html_url":"https://github.com/okriuchykhin","followers_url":"https://api.github.com/users/okriuchykhin/followers","following_url":"https://api.github.com/users/okriuchykhin/following{/other_user}","gists_url":"https://api.github.com/users/okriuchykhin/gists{/gist_id}","starred_url":"https://api.github.com/users/okriuchykhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okriuchykhin/subscriptions","organizations_url":"https://api.github.com/users/okriuchykhin/orgs","repos_url":"https://api.github.com/users/okriuchykhin/repos","events_url":"https://api.github.com/users/okriuchykhin/events{/privacy}","received_events_url":"https://api.github.com/users/okriuchykhin/received_events","type":"User","site_admin":false},"assignees":[{"login":"okriuchykhin","id":22216856,"avatar_url":"https://avatars.githubusercontent.com/u/22216856?v=3","gravatar_id":"","url":"https://api.github.com/users/okriuchykhin","html_url":"https://github.com/okriuchykhin","followers_url":"https://api.github.com/users/okriuchykhin/followers","following_url":"https://api.github.com/users/okriuchykhin/following{/other_user}","gists_url":"https://api.github.com/users/okriuchykhin/gists{/gist_id}","starred_url":"https://api.github.com/users/okriuchykhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okriuchykhin/subscriptions","organizations_url":"https://api.github.com/users/okriuchykhin/orgs","repos_url":"https://api.github.com/users/okriuchykhin/repos","events_url":"https://api.github.com/users/okriuchykhin/events{/privacy}","received_events_url":"https://api.github.com/users/okriuchykhin/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/242/commits","review_comments_url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/242/comments","review_comment_url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biosistemika/scinote-web/issues/242/comments","statuses_url":"https://api.github.com/repos/biosistemika/scinote-web/statuses/f10ce78b65d812bd8554ab81a4f71b12ce28796a","head":{"label":"okriuchykhin:ok_SCI_580_v2","ref":"ok_SCI_580_v2","sha":"f10ce78b65d812bd8554ab81a4f71b12ce28796a","user":{"login":"okriuchykhin","id":22216856,"avatar_url":"https://avatars.githubusercontent.com/u/22216856?v=3","gravatar_id":"","url":"https://api.github.com/users/okriuchykhin","html_url":"https://github.com/okriuchykhin","followers_url":"https://api.github.com/users/okriuchykhin/followers","following_url":"https://api.github.com/users/okriuchykhin/following{/other_user}","gists_url":"https://api.github.com/users/okriuchykhin/gists{/gist_id}","starred_url":"https://api.github.com/users/okriuchykhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okriuchykhin/subscriptions","organizations_url":"https://api.github.com/users/okriuchykhin/orgs","repos_url":"https://api.github.com/users/okriuchykhin/repos","events_url":"https://api.github.com/users/okriuchykhin/events{/privacy}","received_events_url":"https://api.github.com/users/okriuchykhin/received_events","type":"User","site_admin":false},"repo":{"id":68292067,"name":"scinote-web","full_name":"okriuchykhin/scinote-web","owner":{"login":"okriuchykhin","id":22216856,"avatar_url":"https://avatars.githubusercontent.com/u/22216856?v=3","gravatar_id":"","url":"https://api.github.com/users/okriuchykhin","html_url":"https://github.com/okriuchykhin","followers_url":"https://api.github.com/users/okriuchykhin/followers","following_url":"https://api.github.com/users/okriuchykhin/following{/other_user}","gists_url":"https://api.github.com/users/okriuchykhin/gists{/gist_id}","starred_url":"https://api.github.com/users/okriuchykhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okriuchykhin/subscriptions","organizations_url":"https://api.github.com/users/okriuchykhin/orgs","repos_url":"https://api.github.com/users/okriuchykhin/repos","events_url":"https://api.github.com/users/okriuchykhin/events{/privacy}","received_events_url":"https://api.github.com/users/okriuchykhin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/okriuchykhin/scinote-web","description":"Open source electronic scientific notebook (ELN) that helps you manage your laboratory work and stores all your experimental data in one place.","fork":true,"url":"https://api.github.com/repos/okriuchykhin/scinote-web","forks_url":"https://api.github.com/repos/okriuchykhin/scinote-web/forks","keys_url":"https://api.github.com/repos/okriuchykhin/scinote-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/okriuchykhin/scinote-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/okriuchykhin/scinote-web/teams","hooks_url":"https://api.github.com/repos/okriuchykhin/scinote-web/hooks","issue_events_url":"https://api.github.com/repos/okriuchykhin/scinote-web/issues/events{/number}","events_url":"https://api.github.com/repos/okriuchykhin/scinote-web/events","assignees_url":"https://api.github.com/repos/okriuchykhin/scinote-web/assignees{/user}","branches_url":"https://api.github.com/repos/okriuchykhin/scinote-web/branches{/branch}","tags_url":"https://api.github.com/repos/okriuchykhin/scinote-web/tags","blobs_url":"https://api.github.com/repos/okriuchykhin/scinote-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/okriuchykhin/scinote-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/okriuchykhin/scinote-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/okriuchykhin/scinote-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/okriuchykhin/scinote-web/statuses/{sha}","languages_url":"https://api.github.com/repos/okriuchykhin/scinote-web/languages","stargazers_url":"https://api.github.com/repos/okriuchykhin/scinote-web/stargazers","contributors_url":"https://api.github.com/repos/okriuchykhin/scinote-web/contributors","subscribers_url":"https://api.github.com/repos/okriuchykhin/scinote-web/subscribers","subscription_url":"https://api.github.com/repos/okriuchykhin/scinote-web/subscription","commits_url":"https://api.github.com/repos/okriuchykhin/scinote-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/okriuchykhin/scinote-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/okriuchykhin/scinote-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/okriuchykhin/scinote-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/okriuchykhin/scinote-web/contents/{+path}","compare_url":"https://api.github.com/repos/okriuchykhin/scinote-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/okriuchykhin/scinote-web/merges","archive_url":"https://api.github.com/repos/okriuchykhin/scinote-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/okriuchykhin/scinote-web/downloads","issues_url":"https://api.github.com/repos/okriuchykhin/scinote-web/issues{/number}","pulls_url":"https://api.github.com/repos/okriuchykhin/scinote-web/pulls{/number}","milestones_url":"https://api.github.com/repos/okriuchykhin/scinote-web/milestones{/number}","notifications_url":"https://api.github.com/repos/okriuchykhin/scinote-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/okriuchykhin/scinote-web/labels{/name}","releases_url":"https://api.github.com/repos/okriuchykhin/scinote-web/releases{/id}","deployments_url":"https://api.github.com/repos/okriuchykhin/scinote-web/deployments","created_at":"2016-09-15T12:31:51Z","updated_at":"2016-09-15T12:31:53Z","pushed_at":"2016-10-25T13:07:44Z","git_url":"git://github.com/okriuchykhin/scinote-web.git","ssh_url":"git@github.com:okriuchykhin/scinote-web.git","clone_url":"https://github.com/okriuchykhin/scinote-web.git","svn_url":"https://github.com/okriuchykhin/scinote-web","homepage":"http://www.scinote.net","size":6921,"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":"biosistemika:modular-tasks","ref":"modular-tasks","sha":"a15400aef722d1eacbe3e7799ec1e8487f7c509f","user":{"login":"biosistemika","id":15630206,"avatar_url":"https://avatars.githubusercontent.com/u/15630206?v=3","gravatar_id":"","url":"https://api.github.com/users/biosistemika","html_url":"https://github.com/biosistemika","followers_url":"https://api.github.com/users/biosistemika/followers","following_url":"https://api.github.com/users/biosistemika/following{/other_user}","gists_url":"https://api.github.com/users/biosistemika/gists{/gist_id}","starred_url":"https://api.github.com/users/biosistemika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biosistemika/subscriptions","organizations_url":"https://api.github.com/users/biosistemika/orgs","repos_url":"https://api.github.com/users/biosistemika/repos","events_url":"https://api.github.com/users/biosistemika/events{/privacy}","received_events_url":"https://api.github.com/users/biosistemika/received_events","type":"Organization","site_admin":false},"repo":{"id":51598133,"name":"scinote-web","full_name":"biosistemika/scinote-web","owner":{"login":"biosistemika","id":15630206,"avatar_url":"https://avatars.githubusercontent.com/u/15630206?v=3","gravatar_id":"","url":"https://api.github.com/users/biosistemika","html_url":"https://github.com/biosistemika","followers_url":"https://api.github.com/users/biosistemika/followers","following_url":"https://api.github.com/users/biosistemika/following{/other_user}","gists_url":"https://api.github.com/users/biosistemika/gists{/gist_id}","starred_url":"https://api.github.com/users/biosistemika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biosistemika/subscriptions","organizations_url":"https://api.github.com/users/biosistemika/orgs","repos_url":"https://api.github.com/users/biosistemika/repos","events_url":"https://api.github.com/users/biosistemika/events{/privacy}","received_events_url":"https://api.github.com/users/biosistemika/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biosistemika/scinote-web","description":"Open source electronic scientific notebook (ELN) that helps you manage your laboratory work and stores all your experimental data in one place.","fork":false,"url":"https://api.github.com/repos/biosistemika/scinote-web","forks_url":"https://api.github.com/repos/biosistemika/scinote-web/forks","keys_url":"https://api.github.com/repos/biosistemika/scinote-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biosistemika/scinote-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biosistemika/scinote-web/teams","hooks_url":"https://api.github.com/repos/biosistemika/scinote-web/hooks","issue_events_url":"https://api.github.com/repos/biosistemika/scinote-web/issues/events{/number}","events_url":"https://api.github.com/repos/biosistemika/scinote-web/events","assignees_url":"https://api.github.com/repos/biosistemika/scinote-web/assignees{/user}","branches_url":"https://api.github.com/repos/biosistemika/scinote-web/branches{/branch}","tags_url":"https://api.github.com/repos/biosistemika/scinote-web/tags","blobs_url":"https://api.github.com/repos/biosistemika/scinote-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biosistemika/scinote-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biosistemika/scinote-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/biosistemika/scinote-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biosistemika/scinote-web/statuses/{sha}","languages_url":"https://api.github.com/repos/biosistemika/scinote-web/languages","stargazers_url":"https://api.github.com/repos/biosistemika/scinote-web/stargazers","contributors_url":"https://api.github.com/repos/biosistemika/scinote-web/contributors","subscribers_url":"https://api.github.com/repos/biosistemika/scinote-web/subscribers","subscription_url":"https://api.github.com/repos/biosistemika/scinote-web/subscription","commits_url":"https://api.github.com/repos/biosistemika/scinote-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/biosistemika/scinote-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/biosistemika/scinote-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/biosistemika/scinote-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/biosistemika/scinote-web/contents/{+path}","compare_url":"https://api.github.com/repos/biosistemika/scinote-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biosistemika/scinote-web/merges","archive_url":"https://api.github.com/repos/biosistemika/scinote-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biosistemika/scinote-web/downloads","issues_url":"https://api.github.com/repos/biosistemika/scinote-web/issues{/number}","pulls_url":"https://api.github.com/repos/biosistemika/scinote-web/pulls{/number}","milestones_url":"https://api.github.com/repos/biosistemika/scinote-web/milestones{/number}","notifications_url":"https://api.github.com/repos/biosistemika/scinote-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biosistemika/scinote-web/labels{/name}","releases_url":"https://api.github.com/repos/biosistemika/scinote-web/releases{/id}","deployments_url":"https://api.github.com/repos/biosistemika/scinote-web/deployments","created_at":"2016-02-12T15:47:19Z","updated_at":"2016-10-24T15:02:09Z","pushed_at":"2016-10-25T13:07:44Z","git_url":"git://github.com/biosistemika/scinote-web.git","ssh_url":"git@github.com:biosistemika/scinote-web.git","clone_url":"https://github.com/biosistemika/scinote-web.git","svn_url":"https://github.com/biosistemika/scinote-web","homepage":"http://www.scinote.net","size":7116,"stargazers_count":30,"watchers_count":30,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":7,"forks":15,"open_issues":7,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/242"},"html":{"href":"https://github.com/biosistemika/scinote-web/pull/242"},"issue":{"href":"https://api.github.com/repos/biosistemika/scinote-web/issues/242"},"comments":{"href":"https://api.github.com/repos/biosistemika/scinote-web/issues/242/comments"},"review_comments":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/242/comments"},"review_comment":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/242/commits"},"statuses":{"href":"https://api.github.com/repos/biosistemika/scinote-web/statuses/f10ce78b65d812bd8554ab81a4f71b12ce28796a"}}}}
{"actor":{"display_login":"houndci-bot"}}