{"action":"created","comment":{"url":"https://api.github.com/repos/WGBH/stock-sales-2/pulls/comments/42787568","id":42787568,"diff_hunk":"@@ -1,10 +1,22 @@\n-<dl>\n-  <% fields.each do |method| \n-    asset.send(method).tap do |value| \n-      if !value.empty? %>\n-        <dt><%= method.gsub('_',' ').gsub(/clip /i, '') %></dt>\n-        <dd><%= value %></dd><% \n-      end\n-    end\n-  end %>\n-</dl>\n\\ No newline at end of file\n+<%\n+# default to 1 column, and only allow up to 4\n+columns ||= 1\n+columns = [columns.to_i, 4].min","path":"app/views/catalog/_field_list.html.erb","position":15,"original_position":15,"commit_id":"1e49d2a2f1ebb526ee0f694d8fa208e302f2584e","original_commit_id":"1e49d2a2f1ebb526ee0f694d8fa208e302f2584e","user":{"login":"afred","id":1507490,"avatar_url":"https://avatars.githubusercontent.com/u/1507490?v=3","gravatar_id":"","url":"https://api.github.com/users/afred","html_url":"https://github.com/afred","followers_url":"https://api.github.com/users/afred/followers","following_url":"https://api.github.com/users/afred/following{/other_user}","gists_url":"https://api.github.com/users/afred/gists{/gist_id}","starred_url":"https://api.github.com/users/afred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afred/subscriptions","organizations_url":"https://api.github.com/users/afred/orgs","repos_url":"https://api.github.com/users/afred/repos","events_url":"https://api.github.com/users/afred/events{/privacy}","received_events_url":"https://api.github.com/users/afred/received_events","type":"User","site_admin":false},"body":"i'm not a fan of checking param values or setting defaults in the partial. The parameterization is a good thing, but a view is not a method, so it gets awkward when we treat it like one. But until we come up with a better way, I'll fail explicitly here on invalid number of columns.","created_at":"2015-10-22T18:34:45Z","updated_at":"2015-10-22T18:34:45Z","html_url":"https://github.com/WGBH/stock-sales-2/pull/200#discussion_r42787568","pull_request_url":"https://api.github.com/repos/WGBH/stock-sales-2/pulls/200","_links":{"self":{"href":"https://api.github.com/repos/WGBH/stock-sales-2/pulls/comments/42787568"},"html":{"href":"https://github.com/WGBH/stock-sales-2/pull/200#discussion_r42787568"},"pull_request":{"href":"https://api.github.com/repos/WGBH/stock-sales-2/pulls/200"}}},"pull_request":{"url":"https://api.github.com/repos/WGBH/stock-sales-2/pulls/200","id":48483756,"html_url":"https://github.com/WGBH/stock-sales-2/pull/200","diff_url":"https://github.com/WGBH/stock-sales-2/pull/200.diff","patch_url":"https://github.com/WGBH/stock-sales-2/pull/200.patch","issue_url":"https://api.github.com/repos/WGBH/stock-sales-2/issues/200","number":200,"state":"open","locked":false,"title":"Refactor catalog show view","user":{"login":"afred","id":1507490,"avatar_url":"https://avatars.githubusercontent.com/u/1507490?v=3","gravatar_id":"","url":"https://api.github.com/users/afred","html_url":"https://github.com/afred","followers_url":"https://api.github.com/users/afred/followers","following_url":"https://api.github.com/users/afred/following{/other_user}","gists_url":"https://api.github.com/users/afred/gists{/gist_id}","starred_url":"https://api.github.com/users/afred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afred/subscriptions","organizations_url":"https://api.github.com/users/afred/orgs","repos_url":"https://api.github.com/users/afred/repos","events_url":"https://api.github.com/users/afred/events{/privacy}","received_events_url":"https://api.github.com/users/afred/received_events","type":"User","site_admin":false},"body":"@mccalluc take a look at this and tell me what you think.\r\n\r\nI started poking around because of some tight coupling between views and the Asset model. It has become clear to me that our Asset model is pretty much trying to mimic what the SolrDocument model is designed to do, at least in the context of rendering solr data.\r\n\r\nBy default, Blacklight instantiates and returns SolrDocument object with the hash retrieved from solr when `#fetch` is called, and then passes `@document` or `documents` to it's default views.\r\n\r\nBy moving presentation logic from Asset to SolrDocument, we can avoid a layer of abstraction and extra steps to set up Asset instances that aren't really needed.","created_at":"2015-10-22T16:54:57Z","updated_at":"2015-10-22T18:34:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ddae115781304fabf027ada41ec35e37abcfcb95","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/WGBH/stock-sales-2/pulls/200/commits","review_comments_url":"https://api.github.com/repos/WGBH/stock-sales-2/pulls/200/comments","review_comment_url":"https://api.github.com/repos/WGBH/stock-sales-2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WGBH/stock-sales-2/issues/200/comments","statuses_url":"https://api.github.com/repos/WGBH/stock-sales-2/statuses/1e49d2a2f1ebb526ee0f694d8fa208e302f2584e","head":{"label":"WGBH:refactor-catalog-show-view","ref":"refactor-catalog-show-view","sha":"1e49d2a2f1ebb526ee0f694d8fa208e302f2584e","user":{"login":"WGBH","id":301102,"avatar_url":"https://avatars.githubusercontent.com/u/301102?v=3","gravatar_id":"","url":"https://api.github.com/users/WGBH","html_url":"https://github.com/WGBH","followers_url":"https://api.github.com/users/WGBH/followers","following_url":"https://api.github.com/users/WGBH/following{/other_user}","gists_url":"https://api.github.com/users/WGBH/gists{/gist_id}","starred_url":"https://api.github.com/users/WGBH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WGBH/subscriptions","organizations_url":"https://api.github.com/users/WGBH/orgs","repos_url":"https://api.github.com/users/WGBH/repos","events_url":"https://api.github.com/users/WGBH/events{/privacy}","received_events_url":"https://api.github.com/users/WGBH/received_events","type":"Organization","site_admin":false},"repo":{"id":39387953,"name":"stock-sales-2","full_name":"WGBH/stock-sales-2","owner":{"login":"WGBH","id":301102,"avatar_url":"https://avatars.githubusercontent.com/u/301102?v=3","gravatar_id":"","url":"https://api.github.com/users/WGBH","html_url":"https://github.com/WGBH","followers_url":"https://api.github.com/users/WGBH/followers","following_url":"https://api.github.com/users/WGBH/following{/other_user}","gists_url":"https://api.github.com/users/WGBH/gists{/gist_id}","starred_url":"https://api.github.com/users/WGBH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WGBH/subscriptions","organizations_url":"https://api.github.com/users/WGBH/orgs","repos_url":"https://api.github.com/users/WGBH/repos","events_url":"https://api.github.com/users/WGBH/events{/privacy}","received_events_url":"https://api.github.com/users/WGBH/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WGBH/stock-sales-2","description":"Public Stock Sales Site","fork":false,"url":"https://api.github.com/repos/WGBH/stock-sales-2","forks_url":"https://api.github.com/repos/WGBH/stock-sales-2/forks","keys_url":"https://api.github.com/repos/WGBH/stock-sales-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WGBH/stock-sales-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WGBH/stock-sales-2/teams","hooks_url":"https://api.github.com/repos/WGBH/stock-sales-2/hooks","issue_events_url":"https://api.github.com/repos/WGBH/stock-sales-2/issues/events{/number}","events_url":"https://api.github.com/repos/WGBH/stock-sales-2/events","assignees_url":"https://api.github.com/repos/WGBH/stock-sales-2/assignees{/user}","branches_url":"https://api.github.com/repos/WGBH/stock-sales-2/branches{/branch}","tags_url":"https://api.github.com/repos/WGBH/stock-sales-2/tags","blobs_url":"https://api.github.com/repos/WGBH/stock-sales-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WGBH/stock-sales-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WGBH/stock-sales-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/WGBH/stock-sales-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WGBH/stock-sales-2/statuses/{sha}","languages_url":"https://api.github.com/repos/WGBH/stock-sales-2/languages","stargazers_url":"https://api.github.com/repos/WGBH/stock-sales-2/stargazers","contributors_url":"https://api.github.com/repos/WGBH/stock-sales-2/contributors","subscribers_url":"https://api.github.com/repos/WGBH/stock-sales-2/subscribers","subscription_url":"https://api.github.com/repos/WGBH/stock-sales-2/subscription","commits_url":"https://api.github.com/repos/WGBH/stock-sales-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/WGBH/stock-sales-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/WGBH/stock-sales-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/WGBH/stock-sales-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/WGBH/stock-sales-2/contents/{+path}","compare_url":"https://api.github.com/repos/WGBH/stock-sales-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WGBH/stock-sales-2/merges","archive_url":"https://api.github.com/repos/WGBH/stock-sales-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WGBH/stock-sales-2/downloads","issues_url":"https://api.github.com/repos/WGBH/stock-sales-2/issues{/number}","pulls_url":"https://api.github.com/repos/WGBH/stock-sales-2/pulls{/number}","milestones_url":"https://api.github.com/repos/WGBH/stock-sales-2/milestones{/number}","notifications_url":"https://api.github.com/repos/WGBH/stock-sales-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WGBH/stock-sales-2/labels{/name}","releases_url":"https://api.github.com/repos/WGBH/stock-sales-2/releases{/id}","created_at":"2015-07-20T14:19:16Z","updated_at":"2015-07-20T17:27:43Z","pushed_at":"2015-10-22T18:32:59Z","git_url":"git://github.com/WGBH/stock-sales-2.git","ssh_url":"git@github.com:WGBH/stock-sales-2.git","clone_url":"https://github.com/WGBH/stock-sales-2.git","svn_url":"https://github.com/WGBH/stock-sales-2","homepage":null,"size":2852,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":24,"forks":2,"open_issues":24,"watchers":0,"default_branch":"master"}},"base":{"label":"WGBH:master","ref":"master","sha":"6f7e8c54256331db2a66d3a56b6353ad0d2777d7","user":{"login":"WGBH","id":301102,"avatar_url":"https://avatars.githubusercontent.com/u/301102?v=3","gravatar_id":"","url":"https://api.github.com/users/WGBH","html_url":"https://github.com/WGBH","followers_url":"https://api.github.com/users/WGBH/followers","following_url":"https://api.github.com/users/WGBH/following{/other_user}","gists_url":"https://api.github.com/users/WGBH/gists{/gist_id}","starred_url":"https://api.github.com/users/WGBH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WGBH/subscriptions","organizations_url":"https://api.github.com/users/WGBH/orgs","repos_url":"https://api.github.com/users/WGBH/repos","events_url":"https://api.github.com/users/WGBH/events{/privacy}","received_events_url":"https://api.github.com/users/WGBH/received_events","type":"Organization","site_admin":false},"repo":{"id":39387953,"name":"stock-sales-2","full_name":"WGBH/stock-sales-2","owner":{"login":"WGBH","id":301102,"avatar_url":"https://avatars.githubusercontent.com/u/301102?v=3","gravatar_id":"","url":"https://api.github.com/users/WGBH","html_url":"https://github.com/WGBH","followers_url":"https://api.github.com/users/WGBH/followers","following_url":"https://api.github.com/users/WGBH/following{/other_user}","gists_url":"https://api.github.com/users/WGBH/gists{/gist_id}","starred_url":"https://api.github.com/users/WGBH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WGBH/subscriptions","organizations_url":"https://api.github.com/users/WGBH/orgs","repos_url":"https://api.github.com/users/WGBH/repos","events_url":"https://api.github.com/users/WGBH/events{/privacy}","received_events_url":"https://api.github.com/users/WGBH/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WGBH/stock-sales-2","description":"Public Stock Sales Site","fork":false,"url":"https://api.github.com/repos/WGBH/stock-sales-2","forks_url":"https://api.github.com/repos/WGBH/stock-sales-2/forks","keys_url":"https://api.github.com/repos/WGBH/stock-sales-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WGBH/stock-sales-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WGBH/stock-sales-2/teams","hooks_url":"https://api.github.com/repos/WGBH/stock-sales-2/hooks","issue_events_url":"https://api.github.com/repos/WGBH/stock-sales-2/issues/events{/number}","events_url":"https://api.github.com/repos/WGBH/stock-sales-2/events","assignees_url":"https://api.github.com/repos/WGBH/stock-sales-2/assignees{/user}","branches_url":"https://api.github.com/repos/WGBH/stock-sales-2/branches{/branch}","tags_url":"https://api.github.com/repos/WGBH/stock-sales-2/tags","blobs_url":"https://api.github.com/repos/WGBH/stock-sales-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WGBH/stock-sales-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WGBH/stock-sales-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/WGBH/stock-sales-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WGBH/stock-sales-2/statuses/{sha}","languages_url":"https://api.github.com/repos/WGBH/stock-sales-2/languages","stargazers_url":"https://api.github.com/repos/WGBH/stock-sales-2/stargazers","contributors_url":"https://api.github.com/repos/WGBH/stock-sales-2/contributors","subscribers_url":"https://api.github.com/repos/WGBH/stock-sales-2/subscribers","subscription_url":"https://api.github.com/repos/WGBH/stock-sales-2/subscription","commits_url":"https://api.github.com/repos/WGBH/stock-sales-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/WGBH/stock-sales-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/WGBH/stock-sales-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/WGBH/stock-sales-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/WGBH/stock-sales-2/contents/{+path}","compare_url":"https://api.github.com/repos/WGBH/stock-sales-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WGBH/stock-sales-2/merges","archive_url":"https://api.github.com/repos/WGBH/stock-sales-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WGBH/stock-sales-2/downloads","issues_url":"https://api.github.com/repos/WGBH/stock-sales-2/issues{/number}","pulls_url":"https://api.github.com/repos/WGBH/stock-sales-2/pulls{/number}","milestones_url":"https://api.github.com/repos/WGBH/stock-sales-2/milestones{/number}","notifications_url":"https://api.github.com/repos/WGBH/stock-sales-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WGBH/stock-sales-2/labels{/name}","releases_url":"https://api.github.com/repos/WGBH/stock-sales-2/releases{/id}","created_at":"2015-07-20T14:19:16Z","updated_at":"2015-07-20T17:27:43Z","pushed_at":"2015-10-22T18:32:59Z","git_url":"git://github.com/WGBH/stock-sales-2.git","ssh_url":"git@github.com:WGBH/stock-sales-2.git","clone_url":"https://github.com/WGBH/stock-sales-2.git","svn_url":"https://github.com/WGBH/stock-sales-2","homepage":null,"size":2852,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":24,"forks":2,"open_issues":24,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WGBH/stock-sales-2/pulls/200"},"html":{"href":"https://github.com/WGBH/stock-sales-2/pull/200"},"issue":{"href":"https://api.github.com/repos/WGBH/stock-sales-2/issues/200"},"comments":{"href":"https://api.github.com/repos/WGBH/stock-sales-2/issues/200/comments"},"review_comments":{"href":"https://api.github.com/repos/WGBH/stock-sales-2/pulls/200/comments"},"review_comment":{"href":"https://api.github.com/repos/WGBH/stock-sales-2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WGBH/stock-sales-2/pulls/200/commits"},"statuses":{"href":"https://api.github.com/repos/WGBH/stock-sales-2/statuses/1e49d2a2f1ebb526ee0f694d8fa208e302f2584e"}}}}