{"action":"created","comment":{"url":"https://api.github.com/repos/projectblacklight/blacklight/pulls/comments/44845295","id":44845295,"diff_hunk":"@@ -172,12 +172,13 @@ def has_thumbnail? document\n   ##\n   # Render the thumbnail, if available, for a document and\n   # link it to the document record.\n-  # \n+  #\n   # @param [SolrDocument]\n   # @param [Hash] options to pass to the image tag\n   # @param [Hash] url options to pass to #link_to_document\n   # @return [String]\n   def render_thumbnail_tag document, image_options = {}, url_options = {}\n+    return \"\" unless has_thumbnail?(document) # do not render any html if there is no thumbnail","path":"app/helpers/blacklight/catalog_helper_behavior.rb","position":83,"original_position":83,"commit_id":"874c4c1fb7a3375cc9bc77fd5c215f2d14641a96","original_commit_id":"874c4c1fb7a3375cc9bc77fd5c215f2d14641a96","user":{"login":"peetucket","id":47137,"avatar_url":"https://avatars.githubusercontent.com/u/47137?v=3","gravatar_id":"","url":"https://api.github.com/users/peetucket","html_url":"https://github.com/peetucket","followers_url":"https://api.github.com/users/peetucket/followers","following_url":"https://api.github.com/users/peetucket/following{/other_user}","gists_url":"https://api.github.com/users/peetucket/gists{/gist_id}","starred_url":"https://api.github.com/users/peetucket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peetucket/subscriptions","organizations_url":"https://api.github.com/users/peetucket/orgs","repos_url":"https://api.github.com/users/peetucket/repos","events_url":"https://api.github.com/users/peetucket/events{/privacy}","received_events_url":"https://api.github.com/users/peetucket/received_events","type":"User","site_admin":false},"body":"interesting, the issue i was trying to fix was in the gallery view, which comes from https://github.com/projectblacklight/blacklight-gallery \r\n\r\nso..this issue is currently not in the other search result views (which is explained by that method).  \r\n\r\nSo I think we have an option to do something very similar in the gallery gem (check for has_thumbnail?) before rendering. \r\n\r\nThe one downside is that we ever decide to actually render something like a placeholder, we may actually want to do it in the the \"render_thumbnail_tag\" method itself and *remove* the check for has_thumbnail? in https://github.com/projectblacklight/blacklight/blob/master/app/views/catalog/_thumbnail_default.html.erb#L1","created_at":"2015-11-13T23:11:05Z","updated_at":"2015-11-13T23:11:05Z","html_url":"https://github.com/projectblacklight/blacklight/pull/1332#discussion_r44845295","pull_request_url":"https://api.github.com/repos/projectblacklight/blacklight/pulls/1332","_links":{"self":{"href":"https://api.github.com/repos/projectblacklight/blacklight/pulls/comments/44845295"},"html":{"href":"https://github.com/projectblacklight/blacklight/pull/1332#discussion_r44845295"},"pull_request":{"href":"https://api.github.com/repos/projectblacklight/blacklight/pulls/1332"}}},"pull_request":{"url":"https://api.github.com/repos/projectblacklight/blacklight/pulls/1332","id":50698777,"html_url":"https://github.com/projectblacklight/blacklight/pull/1332","diff_url":"https://github.com/projectblacklight/blacklight/pull/1332.diff","patch_url":"https://github.com/projectblacklight/blacklight/pull/1332.patch","issue_url":"https://api.github.com/repos/projectblacklight/blacklight/issues/1332","number":1332,"state":"open","locked":false,"title":"Non image objects in search results","user":{"login":"peetucket","id":47137,"avatar_url":"https://avatars.githubusercontent.com/u/47137?v=3","gravatar_id":"","url":"https://api.github.com/users/peetucket","html_url":"https://github.com/peetucket","followers_url":"https://api.github.com/users/peetucket/followers","following_url":"https://api.github.com/users/peetucket/following{/other_user}","gists_url":"https://api.github.com/users/peetucket/gists{/gist_id}","starred_url":"https://api.github.com/users/peetucket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peetucket/subscriptions","organizations_url":"https://api.github.com/users/peetucket/orgs","repos_url":"https://api.github.com/users/peetucket/repos","events_url":"https://api.github.com/users/peetucket/events{/privacy}","received_events_url":"https://api.github.com/users/peetucket/received_events","type":"User","site_admin":false},"body":"Instead of rendering a blank HTML image tag when there is no thumbnail for an object, just don't render anything.","created_at":"2015-11-13T22:12:33Z","updated_at":"2015-11-13T23:11:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74f22b48c35f1f90c2e079e3557d389cb758c847","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/projectblacklight/blacklight/pulls/1332/commits","review_comments_url":"https://api.github.com/repos/projectblacklight/blacklight/pulls/1332/comments","review_comment_url":"https://api.github.com/repos/projectblacklight/blacklight/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectblacklight/blacklight/issues/1332/comments","statuses_url":"https://api.github.com/repos/projectblacklight/blacklight/statuses/874c4c1fb7a3375cc9bc77fd5c215f2d14641a96","head":{"label":"peetucket:non-image-objects-in-search-results","ref":"non-image-objects-in-search-results","sha":"874c4c1fb7a3375cc9bc77fd5c215f2d14641a96","user":{"login":"peetucket","id":47137,"avatar_url":"https://avatars.githubusercontent.com/u/47137?v=3","gravatar_id":"","url":"https://api.github.com/users/peetucket","html_url":"https://github.com/peetucket","followers_url":"https://api.github.com/users/peetucket/followers","following_url":"https://api.github.com/users/peetucket/following{/other_user}","gists_url":"https://api.github.com/users/peetucket/gists{/gist_id}","starred_url":"https://api.github.com/users/peetucket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peetucket/subscriptions","organizations_url":"https://api.github.com/users/peetucket/orgs","repos_url":"https://api.github.com/users/peetucket/repos","events_url":"https://api.github.com/users/peetucket/events{/privacy}","received_events_url":"https://api.github.com/users/peetucket/received_events","type":"User","site_admin":false},"repo":{"id":43394953,"name":"blacklight","full_name":"peetucket/blacklight","owner":{"login":"peetucket","id":47137,"avatar_url":"https://avatars.githubusercontent.com/u/47137?v=3","gravatar_id":"","url":"https://api.github.com/users/peetucket","html_url":"https://github.com/peetucket","followers_url":"https://api.github.com/users/peetucket/followers","following_url":"https://api.github.com/users/peetucket/following{/other_user}","gists_url":"https://api.github.com/users/peetucket/gists{/gist_id}","starred_url":"https://api.github.com/users/peetucket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peetucket/subscriptions","organizations_url":"https://api.github.com/users/peetucket/orgs","repos_url":"https://api.github.com/users/peetucket/repos","events_url":"https://api.github.com/users/peetucket/events{/privacy}","received_events_url":"https://api.github.com/users/peetucket/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peetucket/blacklight","description":"Blacklight provides a discovery interface for any Solr (http://lucene.apache.org/solr) index.","fork":true,"url":"https://api.github.com/repos/peetucket/blacklight","forks_url":"https://api.github.com/repos/peetucket/blacklight/forks","keys_url":"https://api.github.com/repos/peetucket/blacklight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peetucket/blacklight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peetucket/blacklight/teams","hooks_url":"https://api.github.com/repos/peetucket/blacklight/hooks","issue_events_url":"https://api.github.com/repos/peetucket/blacklight/issues/events{/number}","events_url":"https://api.github.com/repos/peetucket/blacklight/events","assignees_url":"https://api.github.com/repos/peetucket/blacklight/assignees{/user}","branches_url":"https://api.github.com/repos/peetucket/blacklight/branches{/branch}","tags_url":"https://api.github.com/repos/peetucket/blacklight/tags","blobs_url":"https://api.github.com/repos/peetucket/blacklight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peetucket/blacklight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peetucket/blacklight/git/refs{/sha}","trees_url":"https://api.github.com/repos/peetucket/blacklight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peetucket/blacklight/statuses/{sha}","languages_url":"https://api.github.com/repos/peetucket/blacklight/languages","stargazers_url":"https://api.github.com/repos/peetucket/blacklight/stargazers","contributors_url":"https://api.github.com/repos/peetucket/blacklight/contributors","subscribers_url":"https://api.github.com/repos/peetucket/blacklight/subscribers","subscription_url":"https://api.github.com/repos/peetucket/blacklight/subscription","commits_url":"https://api.github.com/repos/peetucket/blacklight/commits{/sha}","git_commits_url":"https://api.github.com/repos/peetucket/blacklight/git/commits{/sha}","comments_url":"https://api.github.com/repos/peetucket/blacklight/comments{/number}","issue_comment_url":"https://api.github.com/repos/peetucket/blacklight/issues/comments{/number}","contents_url":"https://api.github.com/repos/peetucket/blacklight/contents/{+path}","compare_url":"https://api.github.com/repos/peetucket/blacklight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peetucket/blacklight/merges","archive_url":"https://api.github.com/repos/peetucket/blacklight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peetucket/blacklight/downloads","issues_url":"https://api.github.com/repos/peetucket/blacklight/issues{/number}","pulls_url":"https://api.github.com/repos/peetucket/blacklight/pulls{/number}","milestones_url":"https://api.github.com/repos/peetucket/blacklight/milestones{/number}","notifications_url":"https://api.github.com/repos/peetucket/blacklight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peetucket/blacklight/labels{/name}","releases_url":"https://api.github.com/repos/peetucket/blacklight/releases{/id}","created_at":"2015-09-29T21:15:53Z","updated_at":"2015-09-29T21:15:55Z","pushed_at":"2015-11-13T21:41:34Z","git_url":"git://github.com/peetucket/blacklight.git","ssh_url":"git@github.com:peetucket/blacklight.git","clone_url":"https://github.com/peetucket/blacklight.git","svn_url":"https://github.com/peetucket/blacklight","homepage":"http://projectblacklight.org/","size":25839,"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":"projectblacklight:release-5.x","ref":"release-5.x","sha":"dd5a247c6ad5424598072d91b2f9ff1411436221","user":{"login":"projectblacklight","id":120516,"avatar_url":"https://avatars.githubusercontent.com/u/120516?v=3","gravatar_id":"","url":"https://api.github.com/users/projectblacklight","html_url":"https://github.com/projectblacklight","followers_url":"https://api.github.com/users/projectblacklight/followers","following_url":"https://api.github.com/users/projectblacklight/following{/other_user}","gists_url":"https://api.github.com/users/projectblacklight/gists{/gist_id}","starred_url":"https://api.github.com/users/projectblacklight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectblacklight/subscriptions","organizations_url":"https://api.github.com/users/projectblacklight/orgs","repos_url":"https://api.github.com/users/projectblacklight/repos","events_url":"https://api.github.com/users/projectblacklight/events{/privacy}","received_events_url":"https://api.github.com/users/projectblacklight/received_events","type":"Organization","site_admin":false},"repo":{"id":355634,"name":"blacklight","full_name":"projectblacklight/blacklight","owner":{"login":"projectblacklight","id":120516,"avatar_url":"https://avatars.githubusercontent.com/u/120516?v=3","gravatar_id":"","url":"https://api.github.com/users/projectblacklight","html_url":"https://github.com/projectblacklight","followers_url":"https://api.github.com/users/projectblacklight/followers","following_url":"https://api.github.com/users/projectblacklight/following{/other_user}","gists_url":"https://api.github.com/users/projectblacklight/gists{/gist_id}","starred_url":"https://api.github.com/users/projectblacklight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectblacklight/subscriptions","organizations_url":"https://api.github.com/users/projectblacklight/orgs","repos_url":"https://api.github.com/users/projectblacklight/repos","events_url":"https://api.github.com/users/projectblacklight/events{/privacy}","received_events_url":"https://api.github.com/users/projectblacklight/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectblacklight/blacklight","description":"Blacklight provides a discovery interface for any Solr (http://lucene.apache.org/solr) index.","fork":false,"url":"https://api.github.com/repos/projectblacklight/blacklight","forks_url":"https://api.github.com/repos/projectblacklight/blacklight/forks","keys_url":"https://api.github.com/repos/projectblacklight/blacklight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectblacklight/blacklight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectblacklight/blacklight/teams","hooks_url":"https://api.github.com/repos/projectblacklight/blacklight/hooks","issue_events_url":"https://api.github.com/repos/projectblacklight/blacklight/issues/events{/number}","events_url":"https://api.github.com/repos/projectblacklight/blacklight/events","assignees_url":"https://api.github.com/repos/projectblacklight/blacklight/assignees{/user}","branches_url":"https://api.github.com/repos/projectblacklight/blacklight/branches{/branch}","tags_url":"https://api.github.com/repos/projectblacklight/blacklight/tags","blobs_url":"https://api.github.com/repos/projectblacklight/blacklight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectblacklight/blacklight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectblacklight/blacklight/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectblacklight/blacklight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectblacklight/blacklight/statuses/{sha}","languages_url":"https://api.github.com/repos/projectblacklight/blacklight/languages","stargazers_url":"https://api.github.com/repos/projectblacklight/blacklight/stargazers","contributors_url":"https://api.github.com/repos/projectblacklight/blacklight/contributors","subscribers_url":"https://api.github.com/repos/projectblacklight/blacklight/subscribers","subscription_url":"https://api.github.com/repos/projectblacklight/blacklight/subscription","commits_url":"https://api.github.com/repos/projectblacklight/blacklight/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectblacklight/blacklight/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectblacklight/blacklight/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectblacklight/blacklight/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectblacklight/blacklight/contents/{+path}","compare_url":"https://api.github.com/repos/projectblacklight/blacklight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectblacklight/blacklight/merges","archive_url":"https://api.github.com/repos/projectblacklight/blacklight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectblacklight/blacklight/downloads","issues_url":"https://api.github.com/repos/projectblacklight/blacklight/issues{/number}","pulls_url":"https://api.github.com/repos/projectblacklight/blacklight/pulls{/number}","milestones_url":"https://api.github.com/repos/projectblacklight/blacklight/milestones{/number}","notifications_url":"https://api.github.com/repos/projectblacklight/blacklight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectblacklight/blacklight/labels{/name}","releases_url":"https://api.github.com/repos/projectblacklight/blacklight/releases{/id}","created_at":"2009-10-30T20:03:30Z","updated_at":"2015-11-05T08:11:30Z","pushed_at":"2015-11-13T22:12:33Z","git_url":"git://github.com/projectblacklight/blacklight.git","ssh_url":"git@github.com:projectblacklight/blacklight.git","clone_url":"https://github.com/projectblacklight/blacklight.git","svn_url":"https://github.com/projectblacklight/blacklight","homepage":"http://projectblacklight.org/","size":35444,"stargazers_count":349,"watchers_count":349,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":136,"mirror_url":null,"open_issues_count":53,"forks":136,"open_issues":53,"watchers":349,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectblacklight/blacklight/pulls/1332"},"html":{"href":"https://github.com/projectblacklight/blacklight/pull/1332"},"issue":{"href":"https://api.github.com/repos/projectblacklight/blacklight/issues/1332"},"comments":{"href":"https://api.github.com/repos/projectblacklight/blacklight/issues/1332/comments"},"review_comments":{"href":"https://api.github.com/repos/projectblacklight/blacklight/pulls/1332/comments"},"review_comment":{"href":"https://api.github.com/repos/projectblacklight/blacklight/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectblacklight/blacklight/pulls/1332/commits"},"statuses":{"href":"https://api.github.com/repos/projectblacklight/blacklight/statuses/874c4c1fb7a3375cc9bc77fd5c215f2d14641a96"}}}}